checkout script with live API accepts input, but no result shown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Below is the checkout.js script I got from developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/basic-integration/ . Modified it to use "production" rather than "sandbox", and pasted in the LiveAPI key that we created by logging in, going to Dashboard/Rest API Apps.
This site was set up to receive registration fees for a conference. The user enters information on an HTML form, the user is then sent to another page where the total amount owing is displayed. This is the page where I inserted the checkout script.
Result: a paypal button is displayed on the page, and when clicked, connects the user to paypal. The email address of our organization (NOT the user's email) is displayed; the user has to change this, and then can either log into their personal PayPal acct or enter credit card information.
Problem: when the user finishes the transaction, they are returned to the page where checkout is inclued, rather than being passed to the results page that we registered with PayPal. Also, our account shows no record of a transaction having occured (either in Sandbox or Live).
We posted this problem to support@paypal-techsupport.com a couple of days ago, but as yet have received no response/
Any help would be appreciated!
BEGIN CODE
<div id="paypal-button"></div>
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
<script>
paypal.Button.render({
env: 'production', // Specify 'sandbox' for the test environment
// env: 'sandbox', // Specify 'sandbox' for the test environment
client: {
// sandbox:
production: 'xxxxx'
},
payment: function() {
var env = this.props.env;
var client = this.props.client;
return paypal.rest.payment.create(env, client, {
transactions: [
{
amount: { total: <?echo $Fees?>, currency: 'USD' }
}
]
});
},
// Set up the payment here, when the buyer clicks on the button
commit: true, // Optional: show a 'Pay Now' button in the checkout flow
onAuthorize: function(data, actions) {
// Execute the payment here, when the buyer approves the transaction
}
}, '#paypal-button');
</script>
END CODE

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you provide me with the ticket number you got when contacting support@paypal-techsupport.com?
I'll have a look at it and follow up.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Adaptive Payments is not working in REST APIs
- Payment approval does not redirect to return_url in sandbox in Sandbox Environment
- Request is not well-formed, syntactically incorrect, or violates schema. in Sandbox Environment
- legacy payflow link silent post not working in Payflow
- Accepting payments, advanced options not appearing for the PayPal checkout in REST APIs