Order could not be captured
printphoto44
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Mar-25-2019
11:19 PM
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
Labels:
Login to Me Too
- Labels:
-
REST SDK
3 REPLIES 3
gbc-it
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug-04-2020
04:17 AM
Put a reference ID in order:
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
reference_id: "YOURID",
amount: {
value: '0.01'
}
}]
})
},
shane43
New Community Member
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug-13-2020
04:08 AM
naeemgtng
New Community Member
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov-18-2020
08:58 AM
this tells you what reference_id is: https://developer.paypal.com/docs/api/orders/v2/#definition-model-update_purchase_unit_request
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- [UNPROCESSABLE_ENTITY], but payment went through in PayPal Payments Standard
- PAYER_ACTION_REQUIRED returned for Capture intent when calling v2 checkout orders in Sandbox Environment
- API TRANSACTION_REFUSED in Sandbox when Capturing Payment in REST APIs
- When clicking on a payment button generates error: Unexpected token ... in PayPal Payments Standard
- Error: "Unable to change shipping method. Please try again." in PayPal popup in REST APIs