cancel
Showing results for 
Search instead for 
Did you mean: 

Paypal Button throws 422 error

Options
viniciusoliveir
Contributor
Posted on

Hello, I can't identify the reason for an error when using live. Clicking the pay button, the paypal popup closes immediately with the error:

 "Error: /v2/checkout/orders returned status: 422 (Corr ID: daf378feb7fbe)

 

This is the button code:

        
paypal.Buttons({
            style: {
                shape: 'pill',
                color: 'silver',
                layout: 'horizontal',
                label: 'paypal',
                tagline: true
            },
            createOrder: function (data, actions) {
                return actions.order.create({
                    purchase_units: [{
                        amount: {
                            currency_code: 'BRL',
                            value: '101.11'
                        }
                    }]
                });
            },
            onApprove: function (data, actions) {
               .....
            }, onError: function (err) {
                .....
            }
        }).render('#paypal-button-container');

I don't have an exact reference to where the problem is located.

Haven't Found your Answer?

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