cancel
Showing results for 
Search instead for 
Did you mean: 

order.capture().then() does not execute for some order

Contributor

order.capture().then() does not execute for some order

I  am integrate Smart Payment Buttons  https://developer.paypal.com/docs/checkout/ on our website. 

We have a customer has issue that paid in PayPal but on website the order still unpaid. After checking website log we found because function actions.order.capture().then(function(){xxxx}) does not execute;

Transaction ID: 7RX43882HN824294T  customer already received Paypal receipt email
Does it possible to tell me what's wrong with this transaction?
Is there case that capture successfully but the function in then  does not execute?
 
Codes: 

 

paypal.Buttons({
   
        createOrder: function (data, actions) {
            // This function sets up the details of the transaction, including the amount and line item details.
            return actions.order.create({
                purchase_units: [{
                    amount: {
                        value: self.getOrderTotalAmount()
                    },
                    invoice_id: self.getOrderNumber()
                }],
                'application_context': {
                    'shipping_preference': 'NO_SHIPPING'
                }
            }
            );
        },
        onApprove: function (data, actions) {
            return actions.order.capture().then(function (details) {
                //debugger;
                //alert('Transaction completed by ' + details.payer.name.given_name);
                self.placePayPalOrder({ "data": data, "details": details });
			});
        },
        onError: function (data, actions) {
            console.log('======== PayPal onError ========');
            console.log(data);
            console.log(JSON.stringify(actions));
            alert(data);
            jsErrorHandler.postErrorToServer(JSON.stringify(data));
        },
        onCancel: function (data, actions) {
            console.log('======== PayPal onCancel ========');
            console.log(data);
            console.log(JSON.stringify(actions))
            jsErrorHandler.postErrorToServer(data);
        }

    }).render('#paypal-button-container');<p><!--  5f39ae17-8c62-4a45-bc43-b32064c9388a:W3siYmxvY2tJZCI6IjUzNzQtMTU4MzEyNTYyMTk1NSIsImJsb2NrVHlwZSI6InBhcmFncmFwaCIsInN0eWxlcyI6eyJhbGlnbiI6ImxlZnQiLCJpbmRlbnQiOjAsInRleHQtaW5kZW50IjowLCJsaW5lLWhlaWdodCI6MS43NSwiYmFjay1jb2xvciI6IiIsInBhZGRpbmciOiIifSwidHlwZSI6InBhcmFncmFwaCIsInJpY2hUZXh0Ijp7ImRhdGEiOlt7ImNoYXIiOiJoIiwic3R5bGVzIjp7InVuZGVybGluZSI6dH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