@plentymarkets/shop-api / doCreatePayPalTransaction
Function: doCreatePayPalTransaction() ​
doCreatePayPalTransaction(
context
,params
):Promise
<Data
<PayPalCreateOrder
>>
Method doCreatePayPalTransaction - creates a PayPal transaction from the current cart
Parameters ​
• context: PlentysystemsIntegrationContext
• params: PayPalCreateTransactionParams
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' });