- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
here is my code:
<script src="https://www.paypal.com/sdk/js?client-id=AVzxh6XXXXXXXX9Z-1gHtNyyjBawLvnvJLRrshVSrLjwhqWoPg3FI9PiTdi-..."></script>
<div id="paypal-button-container" style="position:relative;left:25%;width:50%;text-align:center;color:#FFFF00;"></div>
<script>
paypal.Buttons().render('#paypal-button-container')
</script>
<script>
createOrder: function(data, actions) {
return actions.order.create({
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": "35.00"
}
}
]
});
}
</script>
the buttons show i click on Paypal and login to my sandbox personal account in the popup
is shows the amount of the sale as 0.01..why does it not show 35.00
What am i missing..
Thanks in advance for anyones help
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is my working JS code:
<script src="https://www.paypal.com/sdk/js?client-id=AVzxhXXXXXXXXXXXXXXXXXXXXXgHtNyyjBawLvnvJLRrshVSrLjwhqWoPg3F..."></script>
<div id="paypal-button-container" style="position:relative;left:25%;width:50%;text-align:center;color:#FFFF00;"></div>
<script>
paypal.Buttons(
{createOrder: function(data, actions) {
return actions.order.create({
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": "35.00",
},
},
],
})
},
onApprove:function(data,actions) {
return actions.order.capture().then(function(details){
alert('Transaction completed by ' + details.payer.name.given_name);
})
},
})
.render('#paypal-button-container')
</script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @MickeyMousePark ,
Thank you for posting to the PayPal Merchant Community.
That's great news that you solved the issue. Can you please post what you changed in your JavaScript code to resolve the issue. That will help others that are facing this same issue.
Thank you,
Jennifer
MTS
PayPal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is my working JS code:
<script src="https://www.paypal.com/sdk/js?client-id=AVzxhXXXXXXXXXXXXXXXXXXXXXgHtNyyjBawLvnvJLRrshVSrLjwhqWoPg3F..."></script>
<div id="paypal-button-container" style="position:relative;left:25%;width:50%;text-align:center;color:#FFFF00;"></div>
<script>
paypal.Buttons(
{createOrder: function(data, actions) {
return actions.order.create({
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": "35.00",
},
},
],
})
},
onApprove:function(data,actions) {
return actions.order.capture().then(function(details){
alert('Transaction completed by ' + details.payer.name.given_name);
})
},
})
.render('#paypal-button-container')
</script>
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Issue with Empty store_info in Response Using /v1/reporting/transactions on Sandbox API in REST APIs
- Add Others data in SDKs
- IPN works in sandbox but not live in Sandbox Environment
- Change the button from Sandbox to Production in REST APIs
- PayPal Express Checkout charging incorrect values? in Sandbox Environment