可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
Are there any PayPal APIs to process multiple transactions at once? I'm creating a website where a customer may want to purchase multiple items from different vendors. Currently I have it set up where my website cart redirects the customer to PayPal for each vendor, but I can see this potentially driving customers away. I've looked around but haven't quite found anything information on this.
Any information on tutorials or the APIs would be greatly appreciated.
回答1:
PayPal definitely supports this. In fact, it offers multiple products to do so.
These are the products you can look at:
- PayPal Adaptive Parallel Payments
- PayPal Adaptive Chained Payments
- PayPal Express Checkout Parallel Payments
All of these support a single checkout flow with multiple receivers.
The basic difference between Adaptive and Express Checkout is that if you choose the Adaptive API's, you can easily change to Chained Payments later.
On the other hand, if you integrate Express Checkout with Parallel Payments, you can make use of the built-in Mobile Express Checkout, which automatically offers a mobile-sized checkout page to mobile devices, and Express Checkout supports 'line items' (item details shown on the checkout page), which Adaptive Payments doesn't at the moment.
https://www.x.com/developers/paypal/products/adaptive-payments
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_APIntro
https://www.x.com/developers/paypal/products/express-checkout
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPParallelPaymens
回答2:
PayPal doesn't support this to my knowledge. If you want the transaction to be pseudo simultaneous, you can use cURL-Multi: http://php.net/manual/en/book.curl.php and process the transactions asynchronously. It will still be separate transactions, but it will go more quickly.