@angular_faruk/paypal
Advanced tools
Comparing version 2.9.5 to 2.9.7
@@ -7,2 +7,3 @@ import { PaypalService } from './paypal.service'; | ||
token: any; | ||
Show_details_authorized: any; | ||
capturedetails: any; | ||
@@ -9,0 +10,0 @@ refund: any; |
{ | ||
"name": "@angular_faruk/paypal", | ||
"version": "2.9.5", | ||
"version": "2.9.7", | ||
"description": "this is new package with api ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
146
README.md
@@ -88,15 +88,16 @@ # Paypal | ||
get_Access_token(ClientID:string,Secret_id:string) { | ||
this.PaypalComponent.Access_token(ClientID,Secret_id).then((response) => { | ||
// Handle successful response here | ||
this.PaypalComponent.Access_token(ClientID, Secret_id).then((response) => { | ||
console.log('Response:', response); | ||
// Handle successful response here | ||
}).catch((error) => { | ||
// You can display a notification to the user or perform any other error handling logic here | ||
console.error('Error:', error); | ||
// You can display a notification to the user or perform any other error handling logic here | ||
}); | ||
} | ||
// START**************************create_order payload for single items | ||
// create_order payload for single items | ||
let OrderformData:any= { | ||
@@ -111,8 +112,20 @@ name: string; | ||
} | ||
const intent = 'CAPTURE'; // This can be 'CAPTURE' or any other value you want | ||
// =============================== CAPTURE================================== | ||
let intent: string = 'CAPTURE';// The merchant intends to capture payment immediately after the customer makes a payment. | ||
//=================================CAPTURE ===================================== | ||
// ===================================== AUTHORIZE BOX READ ============= | ||
let intent: string = 'AUTHORIZE'; | ||
// The merchant intends to authorize a payment and place funds on hold after the customer makes a payment. Authorized payments are best captured within three days of authorization but are available to capture for up to 29 days. After the three-day honor period, the original authorized payment expires and you must re-authorize the payment. You must make a separate request to capture payments on demand. This intent is not supported when you have more than one purchase_unit within your order. | ||
// ===================================== AUTHORIZE BOX READ ============= | ||
// End************************** | ||
// create_order payload for multiple items | ||
// START #################################create_order payload for multiple items | ||
let OrderformData:any= { | ||
@@ -136,10 +149,25 @@ name: string; | ||
} | ||
const intent = 'CAPTURE'; // This can be 'CAPTURE' or any other value you want | ||
// =============================== CAPTURE================================== | ||
let intent: string = 'CAPTURE'; // The merchant intends to capture payment immediately after the customer makes a payment. | ||
//=================================CAPTURE ===================================== | ||
// ===================================== AUTHORIZE BOX READ ============= | ||
let intent: string = 'AUTHORIZE'; | ||
// The merchant intends to authorize a payment and place funds on hold after the customer makes a payment. Authorized payments are best captured within three days of authorization but are available to capture for up to 29 days. After the three-day honor period, the original authorized payment expires and you must re-authorize the payment. You must make a separate request to capture payments on demand. This intent is not supported when you have more than one purchase_unit within your order. | ||
// ===================================== AUTHORIZE BOX READ ============= | ||
// End ############################################ | ||
this.PaypalComponent.create_order(OrderformData).then((response) => { | ||
// Handle successful response here | ||
// start==========================You can hit within this function ============ | ||
this.PaypalComponent.create_order(OrderformData: Orderinterface,intent:string).then((response) => { | ||
// this.order = response.orderss.id | ||
// localStorage.setItem("order", this.order) You can use localStorage | ||
// Handle successful response here | ||
}).catch((error) => { | ||
// You can display a notification to the user or perform any other error handling logic here | ||
// You can display a notification to the user or perform any other error handling logic here | ||
}); | ||
@@ -151,14 +179,42 @@ | ||
// start==========================You can hit within this function ============ | ||
this.PaypalComponent.order_details(order_id:string).then((response) => { | ||
// Handle successful response here | ||
}).catch((error) => { | ||
// You can display a notification to the user or perform any other error handling logic here | ||
}); | ||
// END====================== | ||
// start===============You can hit within this function ============ | ||
this.PaypalComponent.Authorize_payment(order_id).then((response) => { | ||
// Handle successful response here | ||
}).catch((error) => { | ||
// You can display a notification to the user or perform any other error handling logic here | ||
}); | ||
// END====================== | ||
this.PaypalComponent.order_details(order_id).then((response) => { | ||
// Handle successful response here | ||
// start===============You can hit within this function ============ | ||
this.PaypalComponent.Show_details_authorized_payments(authorization_id:string).then((response) => { | ||
// Handle successful response here | ||
}).catch((error) => { | ||
// You can display a notification to the user or perform any other error handling logic here | ||
// You can display a notification to the user or perform any other error handling logic here | ||
}); | ||
// END====================== | ||
this.PaypalComponent.capturePayment(order_id).then((response) => { | ||
// Handle successful response here | ||
// start===============You can hit within this function ============ | ||
// Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured. | ||
this.PaypalComponent.Void_authorized_payment(authorization_id: string).then((response) => { | ||
// Handle successful response here | ||
}).catch((error) => { | ||
@@ -168,2 +224,52 @@ // You can display a notification to the user or perform any other error handling logic here | ||
// END====================== | ||
// start===============You can hit within this function ============ | ||
this.PaypalComponent.Capture_authorized_payment(authorization_id: string).then((response) => { | ||
// Handle successful response here | ||
}).catch((error) => { | ||
// You can display a notification to the user or perform any other error handling logic here | ||
}); | ||
// END====================== | ||
// start===============You can hit within this function ============ | ||
this.PaypalComponent.Show_captured_payment_details(capture_ids:string).then((response) => { | ||
// Handle successful response here | ||
}).catch((error) => { | ||
// You can display a notification to the user or perform any other error handling logic here | ||
}); | ||
// END====================== | ||
// start===============You can hit within this function ============ | ||
this.PaypalComponent.Refund_captured_payment(capture_id: string).then((response) => { | ||
// Handle successful response here | ||
}).catch((error) => { | ||
// You can display a notification to the user or perform any other error handling logic here | ||
}); | ||
// END====================== | ||
// start===============You can hit within this function ============ | ||
this.PaypalComponent.Show_refund_details(capture_id).then((response) => { | ||
// Handle successful response here | ||
}).catch((error) => { | ||
// You can display a notification to the user or perform any other error handling logic here | ||
}); | ||
// END====================== | ||
``` | ||
@@ -170,0 +276,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
199414
1673
290