Paypal Buttons - No Money Actually Moved or any sign of transaction other than API logs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I am trying to integrate Paypal buttons onto my website so that visitors can pay our business through Paypal for the cart total based on the items they've purchased.
I am using PHP, HTML, and of course Javascript.
I included this script first:
<script src="https://www.paypal.com/sdk/js?client-id=MY_CLIENT_ID¤cy=USD"></script>
I replaced "MY_CLIENT_ID" with my actual client ID, it's replaced above for obvious reasons.
Next, I included this code:
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
createOrder: function(data, actions) {
return actions.order.create({
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": getAmount()
},
"description": "Test description"
}
]
});
},</script>
The function "getAmount()" receives the cart total.
My "onApprove" script simply redirects the user to another page, but that hasn't been included here.
The PayPal buttons appear just fine:
Clicking on the PayPal button also appears to bring up the correct window:
I log in with a Sandbox account (the default personal account that is provided in Sandbox mode) and then use the PayPal balance to make the transaction. In the Sandbox account, under the Funding tab, it says that there is a $5,000 PayPal balance on that account.
After signing in and choosing to pay with that account, everything goes through seemingly fine and the page redirects like it's supposed to from the onApprove action.
Here's the problem, no funds are subtracted from the Sandbox's Funding account.
When I tried this with a live client key and used a real credit card, I was never charged and my account never said it received the payment. This was despite the onApprove running and the popup window seemingly processing everything fine.
Even further, I can see information in the API event logs:
What am I missing?
Thanks,

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- How do I create a PayPal Button for WordPress? in PayPal Payments Standard
- Checkout buttons appear twice and popups close as soon as they appear (ReactJS) in PayPal Payments Standard
- Error: No ack for postMessage getDelegateOverrides() in Sandbox Environment
- Paypal subscription button - Popup not closing and onApprove not triggered in SDKs
- How to change Continue Shopping button when shopping cart is empty? in PayPal Payments Standard