PayPal Checkout actions.payment.get() returns 400 ack: contingency, contingency: PERMISSION_DENIED
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Scenario
I have modified the code slightly on the demo checkout ( https://developer.paypal.com/demo/checkout/#/pattern/client )
onAuthorize: function(data, actions) { return actions.payment.execute().then(function() { window.alert('Payment Complete!'); }); }
Becomes
onAuthorize: function(data, actions) { return actions.payment.execute().then(function() { return actions.payment.get().then(function(persondata){ window.alert('Payment Complete '+persondata.payer.payer_info.first_name); }); }); ]
This works as expected on https://developer.paypal.com/demo/checkout/#/pattern/client and the popup prompt appears with the customer name
However, when copying the exact same code from the demo checkout to a page on my own domain, the payment is processed but the actions.payment.get() function returns the following:
Header
Request URL: https://www.paypal.com/webapps/hermes/api/payment/PAYID-LOQTRBA76N61243AL182344V? Request method: GET Remote address: 2.20.93.6:443 Status code: 400
Response
{"ack":"contingency","contingency":"PERMISSION_DENIED","meta":{"calc":"5f88aa48560db","rlog":"f5dfmutjx1gQV2oeahemZJyv%2FSY8VvcRRrHSUbQ38ZMf%2BpvEnwj5o40X0QQ0RUwuYQ3YfCadK7MVCKfPsJt9GQ_165edc5cad5"},"server":"_-SZvonM_8Tv7DuwTYyMD160uHjZVXSDqnaTVOe2HemF9Eo36wzxj-tzP55LuZ6VXds73rq8LcK_PffuRdmKb7xD7QQ9RbowLr209sPkHR6HIOMLq-JBlr4HJmHJzid0lK5-M1TmfwoiteQRzoP4GW3YDMlhf8yb4Cdm9wK_YSr-FTbnke8iKwQeBtq7Iuu17p8DdwDMNY2YJqJBQ0QeTWEf_-n9A4XK2ul4EZyEtj1IenatahG7xG"}
Is there some kind of domain based blocking going on here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One further point
This works ok in Sandbox mode on both environments
It's when I run it in Production mode that the problem occurs
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Im getting PERMISSION_DENIED on SandBox API in Sandbox Environment
- PayPal API 403 PERMISSION_DENIED on get order and capture order in REST APIs
- Sandbox works but live => INVALID_RESOURCE_ID in Sandbox Environment
- 403 PERMISSION_DENIED partner-referrals in Sandbox Environment
- PERMISSION_DENIED. You do not have permission to access or perform operations on this resource. in Sandbox Environment