@plentymarkets/shop-api / doApprovePayPalTransaction
Function: doApprovePayPalTransaction() ​
doApprovePayPalTransaction(
context
,params
):Promise
<Data
<PayPalApproveOrder
>>
Method doApprovePayPalTransaction - checks the PayPal transaction and approves it.
Parameters ​
• context: PlentysystemsIntegrationContext
• params: PayPalApproveTransactionParams
transactionId: string - The transaction ID of the PayPal transaction. payerId: string - The PayPal payer ID of the PayPal transaction.
Returns ​
Promise
<Data
<PayPalApproveOrder
>>
Remarks ​
- Calls /rest/payment/payPal/smart_payment/{params.transactionId}/{params.payerId}/capture
- This method is used to approve the PayPal transaction.
- It will only change the status of the PayPal transaction if the user has approved the transaction on the PayPal side.
Example ​
ts
const { data } = await useSdk().plentysystems.doApprovePayPalTransaction({
transactionId: '7PE78730EB4411431',
payerId: 'A676SPCN9SBDQ'
});