@plentymarkets/shop-api / doCapturePayPalOrder
Function: doCapturePayPalOrder() ​
doCapturePayPalOrder(
context
,params
):Promise
<Data
<PayPalApproveOrder
>>
Method doCapturePayPalOrder - (re-)captures a PayPal order.
Parameters ​
• context: PlentysystemsIntegrationContext
• params: PayPalCaptureOrderParams
paypalOrderId: string - The PayPal order ID of the PayPal order. paypalPayerId: string - The PayPal payer ID of the PayPal order. plentyOrderId?: number - The order ID
Returns ​
Promise
<Data
<PayPalApproveOrder
>>
Remarks ​
- Calls for capturing /rest/payment/payPal/smart_payment/{params.paypalOrderId}/{params.paypalPayerId}/capture
- Calls for re-capturing /rest/payment/payPal/smart_payment/${params.paypalOrderId}/${params.paypalPayerId}/${params.plentyOrderId}/reinit_capture_order
- This method is used to (re-)capture a PayPal order.
- Response can have an error string, which is a human-readable error message.
Example ​
ts
const { data } = await useSdk().plentysystems.doCapturePayPalOrder({
paypalOrderId: '7PE78730EB4411431',
paypalPayerId: 'A676SPCN9SBDQ',
});