@plentymarkets/shop-api / doCreatePayPalTransaction
Function: doCreatePayPalTransaction() ​
doCreatePayPalTransaction(
context,params):Promise<Data<PayPalCreateOrder>>
Defined in: api/doCreatePayPalTransaction/index.ts:22
Method doCreatePayPalTransaction - creates a PayPal transaction from the current cart
Parameters ​
context ​
PlentysystemsIntegrationContext
params ​
fundingSource: string - PayPal funding source
Returns ​
Promise<Data<PayPalCreateOrder>>
Remarks ​
- Calls /rest/payment/payPal/smart_payment/create/{params.fundingSource}/
- This method is used to create a PayPal transaction from the current cart.
Example ​
ts
const { data } = await useSdk().plentysystems.doCreatePayPalTransaction({ fundingSource: 'paypal' });