jpm
jpm

Reputation: 3430

PayPal Future payments not working in Sandbox ("invalid_request")

I'm trying to implement Future Payments (sandbox) using the android SDK. After I login with a test user, I see the agreement screen, when I click on Accept, I get an error dialog. The log says, that the request was "out of scope" (see below). "Future Payments" is enabled in Sandbox mode. Some sources I found online say, that I should disable it and then re-enable it. But this doesn't work anymore, since I can't even disable features in sandbox mode...(or am I overseeing something? I just see the green check-mark, that's it...)

("Normal" payment works fine in sandbox mode)

W/paypal.sdk: fe SN:13 PayPal Debug-ID: d7227a83c8086 [sandbox, 2.14.5;release]

E/paypal.sdk: request failure with http statusCode:400,exception:Bad Request

E/paypal.sdk: request failed with server response:{"error":"invalid_request","error_description":"Invalid scope requested [https://uri.paypal.com/services/payments/futurepayments]"}

E/paypal.sdk: invalid_request

Upvotes: 1

Views: 392

Answers (1)

jpm
jpm

Reputation: 3430

Ok, I found the solution myself. The green checkmark, doen't mean that something is "enabled" (although, those without a checkmark have a button called "enable"...) it just means that this feature can be enabled in this environment. If you want to check whether it actually is enabled you have to go to:

https://developer.paypal.com/developer/applications/

  1. below REST API, click on your app
  2. "Accept payment" needs to be checked
  3. click "Advanced options" (behind Accept payments)
  4. tadaaa here you can actually enable future payments...

Nice work PayPal...as always the worst design possible.

Upvotes: 1

Related Questions