// Render the PayPal button
paypal.Button.render({
// Set your environment
env: 'production', // sandbox | production
// Specify the style of the button
style: { label: 'PAY', // checkout | credit | pay size: 'RESPONSIVE', // small | medium | responsive shape: 'pill', // pill | rect color: 'gold' // gold | blue | silver },
client: {
sandbox: 'AZDxjDScFpQtjWTOUtWKbyN_bDt4OgqaF4eYXlewfBP4-8aqX3PiV8e1GWU6liB2CUXlkA59kJXE7M6R',
production: '
payment: function(data, actions) { return actions.payment.create({ transactions: [ { amount: { total: '5.00', currency: 'USD' } } ] }); },
onAuthorize: function(data, actions) { return actions.payment.execute().then(function() { window.alert('Payment Complete!'); }); }
}, '#paypal-button-container');