cancel
Showing results for 
Search instead for 
Did you mean: 

Sandbox Account - Error Order could not be captured

New Community Member

Sandbox Account - Error Order could not be captured

I've got a sandbox account that was working OK, the site is just about to go live and I am now consistently getting the above error.

 

I'm using paypay.Buttons:-

 

        paypal.Buttons({
            createOrder: ( data, actions ) => {
                return actions.order.create({
                    purchase_units: [{
                        amount: {
                            value: this.amount.toFixed(2),
                            currency_code: "GBP",
                        }
                    }]
                })
            },
            onApprove: ( data, actions ) => {
                return actions.order.capture().then(details => {
                 console.log('details',details);
                })
            },
            onError: ( error ) => {
                console.log('error',error);
            }
        }).render('#paypal-button-container')

The endpoint failing is:- POST to  https://www.sandbox.paypal.com/smart/api/order/9SS20746CE045201T/capture

 

There's about 16k of output to console, but the final part is:-

 

Error: Order could not be captured
at Yt.(anonymous function) (https://www.paypal.com/sdk/js?client-id=AQ0BP............LKMvKBB7Qd&currency=GBP:1:51457)
at Object.<anonymous> (https://www.paypal.com/sdk/js?client-id=AQ0BP............LKMvKBB7Qd&currency=GBP:1:57716)
at JSON.parse (<anonymous>)
at o (https://www.paypal.com/sdk/js?client-id=AQ0BP............LKMvKBB7Qd&currency=GBP:1:57576)
at ir (https://www.paypal.com/sdk/js?client-id=AQ0BP............LKMvKBB7Qd&currency=GBP:1:57727)
at Er.u.on (https://www.paypal.com/sdk/js?client-id=AQ0BP............LKMvKBB7Qd&currency=GBP:1:62490)
at Er (https://www.paypal.com/sdk/js?client-id=AQ0BP............LKMvKBB7Qd&currency=GBP:1:62679)
at https://www.paypal.com/sdk/js?client-id=AQ0BP............LKMvKBB7Qd&currency=GBP:1:67116
at https://www.paypal.com/sdk/js?client-id=AQ0BP............LKMvKBB7Qd&currency=GBP:1:67162

Any assistance is appreciated.