Paypal Express Checkout not working with production credentials

prakash_reddy
Contributor
Contributor

I have a paypal express checkout button that is working fine with the sandbox account but when I switch to production the payment is not going through, instead after logging in through paypal it says 'Return to Merchant'. The registered business account is verified and I can see api calls being received in dashboard.

paypal.Button.render({

    env: "production", // sandbox | production

    client: {
        sandbox: /* sandbox client id */ 
        production: /* production client id */
    },

    payment: function (data, actions) {
        return actions.payment.create({
            payment: {
                transactions: [
                    {
                        amount: {total: '1', currency: 'USD'}
                    }
                ]
            }
        });
    },
    onAuthorize: function (data, actions) {
        return actions.payment.get().then(function (data) {
            console.log(data)
        });
    }

}, '#paypal-button-container');
Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

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