So I've followed the Paypal documentation to the best of my ability.
Specifically these:
https://developer.paypal.com/docs/platforms/get-started/
https://developer.paypal.com/docs/platforms/seller-onboarding/before-payment/
https://developer.paypal.com/docs/platforms/checkout/immediate-capture/
I'm able to onboard my sandbox seller, and I'm able to create an order (via the steps/example in immediate-capture link) however, when I access the HATEOAS (checkoutnow) to redirect the buyer to the check out form, when I click submit to finalize the checkout, it just redirects to the same page without error messages.
Has anyone encountered this, and if so, can you guide me through it? I can't find much resources online about this.
I've only been trying it via CURL as per their documentation. I've also tried this without a webhook and with a valid one. Same result.
Right now I'll be trying to actually implement it in code, but I'm doubting that will work.
I've been stuck on this for days. Maybe I'm doing something wrong. If you have information, feel free to unload it for me.
My goal for using Paypal Marketplace Platform is to be able to onboard sellers and take a percentage of their sales called the partner fee.
Update:
I added a return_url/cancel_url like @Preston PHX mentioned and it did solve my redirect / refresh issue. However that didn't fix my orders not being approved issue. What did help me capture the payment ultimately is change the payee.email_address value into payee.merchant_id value in the create order API call.
I have a new issue now, in which I cannot find where the platform fee went... It's not in the sandbox account attached to the platform app. I'll create a new post for it.
it just redirects to the same page without error messages.
This happens because you didn't specify a return_url
to come back to. Normally the checkout is displayed using the JS SDK and no redirects at all, so that return_url is not a required parameter. Redirecting is an old integration method, for old websites.
As for a partner_fee , you need to onboard sellers with the Partner Referrals API for that to be valid. Using the Partner Referrals API in the live environment probably requires account approval by PayPal, so make sure you aren't integrating something you don't have permission to use.