Set custom payee in Paypal payment button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to use the Paypal payment button (https://www.paypal.com/buttons/smart?flowloggingId=710a23ebb71f6) to pay someone of your choosing, rather than paying the website owner a set amount. Someone suggested I set the payee (https://developer.paypal.com/docs/checkout/integration-features/custom-payee/) as an object within the purchase_units array, but I can't figure out how to do this. Can anyone help? Thanks.
- Labels:
-
PayPal Buttons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same problem. Example code of Paypal creates an error. If I leave out the "payee" element, the code works, as soon as its in, the code breaks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the solution. The example in the Paypal documentation is wrong. The payee section needs to be part of the "purchase_units" array and not part of "amount" array. So it should look like this:
'purchase_units'=>[0=>[
'payee'=>[
'email_address'=>'some email address'
],
'amount'=>[
...
Hope this helps.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Magento 2 Checkout Screen Asking For Credit Card in Merchant Products and Services Archives
- Zettle refunds and Zettle vs Here in Merchant Products and Services Archives
- Buyer cancelled pending payment just after i posted the package. in Managing Risk and Fraud Archives
- Hi paypal i want to add a donation button from Pakistan in Merchant Products and Services Archives
- Sufficient Evidence for Virtual Goods Sale Dispute? in Managing Risk and Fraud Archives