New to the community? Welcome! Please read our Community Rules and Guidelines
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.
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.
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:
'email_address'=>'some email address'
Hope this helps.