Hi, We are using the standard client side PayPal buttons - as found here: https://developer.paypal.com/demo/checkout/#/pattern/client paypal.Buttons({
style: {
shape: 'rect',
color: 'gold',
layout: 'vertical',
label: 'paypal',
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '12.00'
}
}]
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
},
onError: function(err){
// Post error to our server
}
}).render('#paypal-button-container'); We have also added an onError callback to track when our users experience issues. This is a live site - and we are taking money/using the buttons. The amount is always $12.00 Most of the time - the buttons work well, but some of our users are experiencing errors (10 orders overnight, possibly 2 errors) - and we don't know the reason - the onError callback only provides the following message: Error: Order could not be captured We have no errors in our API log in our paypal account (all green ticks), and as far as we can tell - everything is going well up to this: onApprove: function(data, actions) { return actions.order.capture().then(function(details) { Where the data parameter all looks fine - with status "Approved", and the "actions" parameter is empty - so the actions.order.capture() does not work. We have tried to recreate the errror - no funds in paypal account, no funds on debit/credit card, wrong card details - the buttons seem to handle these issues fine. So we cannot recreate the error, to test it ourselves, all we get is the result of the onError callback. We have tried contacting support for help - but we wanted to see if anyone else had experienced this issue, and found a way to resolve it??? Thanks for the help.
... View more