It's much too late for @Mo1111 but this works for me and someone might find it useful. ppButtonComponent = paypal.Buttons({ style: { shape: 'pill', color: 'blue', layout: 'vertical', label: 'paypal' }, createOrder: function (data, actions) { return actions.order.create({ purchase_units: [{ amount: { value: '2', currency: 'EUR' } }], application_context: { shipping_preference: "NO_SHIPPING" } }); }, onApprove: function (data, actions) { return actions.order.capture().then(function (details) { alert('Transaction completed by ' + details.payer.name.given_name + '!'); }); } }); ppButtonComponent.render('#paypal-button-container');
... View more