checkout script with live API accepts input, but no result shown

Curious_George
Contributor
Contributor

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

 

Login to Me Too
1 REPLY 1

MTS_Nacho
Moderator
Moderator

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.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.