简体   繁体   中英

paypal/wepay delayed chained payment php

I have tried a lot to search but not getting any solution or proper example.

I want to have payment using paypal and wepay payment..

Scenario is , User need to pay using paypal or wepay and user account will be debited at that time only. But until admin approve that payment, middle account and payee will not be credited with the amount. If admin approve the payment then payment release to middle account and payee. If admin disapprove then payer will be refunded. If no action till 45 days then payer will be refunded after 45 days.

I have tried many examples but not getting any proper solutions. i have also tried, https://github.com/paypal/adaptivepayments-sdk-php/tree/master/samples (missing some files)

Please help me out. Please give me some working examples

To rephrase your scenario with a few solutions you could use.

Payer attempts payment to a payee. This enters a queue for which the admin can approve. The payer's card should be tokenized for use, but not actually charged. In WePay, you'd use the /credit_card/create + /credit_card/authorize calls. Now you can charge the card whenever it's approved.

You could also use https://www.wepay.com/developer/usecases/delayed-payouts , which would charge the card first but wouldn't release it to the merchant until you wanted to.

Or you could use a https://www.wepay.com/developer/usecases/tipping-point-payments which would let you take a pledge of the amount, but not charge it until it was approved by the admin.

When the admin approves, you charge the card with the token, trigger the delayed payout, or trigger the tipping point payout. However you wanted the money to come out of the payer's card.

For Paypal- Most likely you'd want to do a preapproval for the transaction https://developer.paypal.com/docs/classic/adaptive-payments/ht_ap-basicPreapproval-curl-etc/

And then after approval, you'd call the Pay API to actually use the preapproval. https://developer.paypal.com/docs/classic/api/adaptive-payments/Pay_API_Operation/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM