I've got a sandbox account that was working OK, after some transaction got success that's give me issue like Order could not be captured and I am now consistently getting the above error.
I'm using paypay.Buttons:-
<script src="https://www.paypal.com/sdk/js?client-id=sb"></script>
paypal.Buttons({ createOrder: function(data, actions) { return actions.order.create({ purchase_units: [{ amount: { value: '0.01' } }] }); }, onApprove: function(data, actions) { return actions.order.capture().then(function(details) { alert('Transaction completed by ' + details.payer.name.given_name); // Call your server to save the transaction /*return fetch('/paypal-transaction-complete', { method: 'post', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ orderID: data.orderID }) });*/ }); } }).render('#paypal-button-container');
so please assists me to fix my issue.
Hope you understood the issue.
Thank You
P.H.Panchal
... View more