Skip to content

Commit

Permalink
36719 - added integration guide for CoFe and sample json file with pa…
Browse files Browse the repository at this point in the history
…rameters to submit to the component
  • Loading branch information
LiudmylaMasliuk committed Jun 27, 2024
1 parent 417cf9a commit 31bbff6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
Binary file added docs/CoFe-PayPal-client-integration.pdf
Binary file not shown.
47 changes: 47 additions & 0 deletions docs/PayPalJson.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
export const PayPalJson = {
getSettingsUrl: "URL/getPayPalSettings",
createPaymentUrl: "URL/createPayment",
createOrderUrl: "URL/createPayPalOrder",
onApproveUrl: "URL/capturePayPalOrder",
shippingMethodId: "", //Leave it empty if you do not use shippingMethodId or pass a valid ID
requestHeader: {
// this key and value object will be sent as header in the API calls
KEY1: "VALUE1",
KEY2: "VALUE2",
},
options: {
clientId: "PAYPAL_CLIENT_ID",
currency: "EUR",
},
fundingSource: "paypal",
cartInformation: {
account: {
email: "CUSTOMER_EMAIL",
},
billing: {
firstName: "CUSTOMER_FIRST_NAME",
lastName: "CUSTOMER_LAST_NAME",
streetName: "CUSTOMER_STREET_NAME",
streetNumber: "CUSTOMER_STREET_NUMBER",
city: "CUSTOMER_CITY",
country: "CUSTOMER_COUNTRY_CODE",
postalCode: "CUSTOMER_POSTAL_CODE",
},
shipping: {
firstName: "CUSTOMER_FIRST_NAME",
lastName: "CUSTOMER_LAST_NAME",
streetName: "CUSTOMER_STREET_NAME",
streetNumber: "CUSTOMER_STREET_NUMBER",
city: "CUSTOMER_CITY",
country: "CUSTOMER_COUNTRY_CODE",
postalCode: "CUSTOMER_POSTAL_CODE",
},
},
purchaseCallback: (result: any, options: any) => {
// this function will be called after the payment is done
},
authenticateThreeDSOrderUrl: "URL/authenticateThreeDSOrder", //For CardFields and GooglePay component
getClientTokenUrl: "URL/getClientToken", //For CardFields component
getOrderUrl: "URL/getPayPalOrder", //Optional
authorizeOrderUrl: "URL/authorizePayPalOrder", // For Vaulting
};

0 comments on commit 31bbff6

Please sign in to comment.