Hi, I am using paypal vertical button in my website . When quantity: '1' payment works fine, but when quantity: '2' payment fails. Attaching the working and non working script. I could not find any difference except quantity and price. I followed the below link to integrate Paypal to my account. https://developer.paypal.com/demo/checkout/#/pattern/vertical Woking Code: quantity: '1' paypal.Button.render({env: 'production',style: {layout: 'vertical',size: 'medium',shape: 'rect',color: 'gold'},funding: {allowed: [ paypal.FUNDING.CARD, paypal.FUNDING.CREDIT ],disallowed: [ ]},client: {sandbox: 'XXXX',production: 'XXXX'},payment: function(data, actions) {return actions.payment.create({payment: {transactions: [{amount: {total: '123.16', currency: 'AUD', details: { subtotal: '123.16', tax: '0.00', shipping: '0.00', handling_fee: '0.00', shipping_discount: '0.00', insurance: '0.00' } },description: 'The payment transaction for the Order number:XXX', item_list: { items: [ { name: 'XXX', description: 'XXX', quantity: '1', price: '123.16', sku: 'GDIS00389', currency: 'AUD' } ], shipping_address : { recipient_name: 'XXX', line1: 'XXX', line2: '53', city: 'XXX', country_code: 'AU', postal_code: 'XXX', state: 'XXX' } }},]}});},onAuthorize: function(data, actions) {return actions.payment.execute().then(function() {window.location.href = 'XXX';});},onCancel: function(data, actions) {}}, '#paypal-button-container'); Not Working Code: quantity: '2' paypal.Button.render({env: 'production',style: {layout: 'vertical',size: 'medium',shape: 'rect',color: 'gold'},funding: {allowed: [ paypal.FUNDING.CARD, paypal.FUNDING.CREDIT ],disallowed: [ ]},client: {sandbox: 'XXXX',production: 'XXXX'},payment: function(data, actions) {return actions.payment.create({payment: {transactions: [{amount: {total: '246.32', currency: 'AUD', details: { subtotal: '246.32', tax: '0.00', shipping: '0.00', handling_fee: '0.00', shipping_discount: '0.00', insurance: '0.00' } },description: 'The payment transaction for the Order number:XXX', item_list: { items: [ { name: 'XXX', description: 'XXX', quantity: '2', price: '246.32', sku: 'GDIS00389', currency: 'AUD' } ], shipping_address : { recipient_name: 'XXX', line1: 'XXX', line2: '53', city: 'XXX', country_code: 'AU', postal_code: 'XXX', state: 'XXX' } }},]}});},onAuthorize: function(data, actions) {return actions.payment.execute().then(function() {window.location.href = 'XXX';});},onCancel: function(data, actions) {}}, '#paypal-button-container'); Any help would be appreciated.
... View more