Paypal express checkout error: Order could not be captured

jcraney3
Contributor
Contributor

I have been testing the integration of the PayPal smart checkout buttons on a web application I have in development all morning but now I am receiving this error after approving the purchase in the PayPal window:

 

Error: Order could not be captured
at d (https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=go...)
at u (https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=go...)
at n.t.dispatch (https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=go...)
at n.t.reject (https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=go...)
at u (https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=go...)
at n.t.dispatch (https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=go...)
at n.t.reject (https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=go...)
at u (https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=go...)
at n.t.dispatch (https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=go...)
at n.t.reject (https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=go...)

Error: Order could not be captured
at $t. (https://www.paypal.com/sdk/js?client-id=AXOwzYr88BtzMuyAYouvqcR4jHZ_LXrcFJEOVV3BfwVvSDXllOmu42hc05Sa...)
at Object. (https://www.paypal.com/sdk/js?client-id=AXOwzYr88BtzMuyAYouvqcR4jHZ_LXrcFJEOVV3BfwVvSDXllOmu42hc05Sa...)
at JSON.parse (<anonymous>)
at o (https://www.paypal.com/sdk/js?client-id=AXOwzYr88BtzMuyAYouvqcR4jHZ_LXrcFJEOVV3BfwVvSDXllOmu42hc05Sa...)
at lr (https://www.paypal.com/sdk/js?client-id=AXOwzYr88BtzMuyAYouvqcR4jHZ_LXrcFJEOVV3BfwVvSDXllOmu42hc05Sa...)
at u.on (https://www.paypal.com/sdk/js?client-id=AXOwzYr88BtzMuyAYouvqcR4jHZ_LXrcFJEOVV3BfwVvSDXllOmu42hc05Sa...)
at wr (https://www.paypal.com/sdk/js?client-id=AXOwzYr88BtzMuyAYouvqcR4jHZ_LXrcFJEOVV3BfwVvSDXllOmu42hc05Sa...)
at https://www.paypal.com/sdk/js?client-id=AXOwzYr88BtzMuyAYouvqcR4jHZ_LXrcFJEOVV3BfwVvSDXllOmu42hc05Sa...
at https://www.paypal.com/sdk/js?client-id=AXOwzYr88BtzMuyAYouvqcR4jHZ_LXrcFJEOVV3BfwVvSDXllOmu42hc05Sa...

 

 

I am not sure if this is a problem with the api or my client call because I have not changed the order object that is getting passed to the orders api. 

Login to Me Too
1 REPLY 1

cjdev
Contributor
Contributor

I was able to reproduce this (undocumented) error by submitting a duplicate invoice id in our attempt to test preventing duplicate payments. PayPal's industry leading worst documentation and api's are, as usual, to blame here - probably not your implementation, which due to their docs is 50% guesswork.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.