function initPayPalButton() {      paypal.Buttons({        style: {          shape: 'rect',          color: 'gold',          layout: 'vertical',          label: 'paypal',                  },        createOrder: function(data, actions) {          return actions.order.create({            purchase_units: [{{quote}description{quote}:{quote}Photo book{quote},{quote}amount{quote}:{{quote}currency_code{quote}:{quote}GBP{quote},{quote}value{quote}:30,{quote}breakdown{quote}:{{quote}item_total{quote}:{{quote}currency_code{quote}:{quote}GBP{quote},{quote}value{quote}:25},{quote}shipping{quote}:{{quote}currency_code{quote}:{quote}GBP{quote},{quote}value{quote}:5},{quote}tax_total{quote}:{{quote}currency_code{quote}:{quote}GBP{quote},{quote}value{quote}:0}}}}]          });        },        onApprove: function(data, actions) {          return actions.order.capture().then(function(orderData) {                        // Full available details            console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));            // Show a success message within this page, e.g.            const element = document.getElementById('paypal-button-container');            element.innerHTML = '';            element.innerHTML = 'Thank you for your payment!';            // Or go to another URL:  actions.redirect('thank_you.html');                      });        },        onError: function(err) {          console.log(err);        }      }).render('#paypal-button-container');    }    initPayPalButton();

 

 

 

 

 

 

 

a d a m w i s e m a n

c o n t a c t

 

wisemanphotography@gmail.com 

Archive at Photoshelter 

+44 7783 221046