https://www.paypal.com/sdk/js?client-id=sb&enable-funding=venmo¤cy=USD
function initPayPalButton() {
paypal.Buttons({
style: {
shape: ‘pill’,
color: ‘silver’,
layout: ‘vertical’,
label: ‘buynow’,
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{“description”:”A Way Of Life – Developing an Exemplary Alzheimer’s Disease and Dementia Program by Susan Gilster”,”amount”:{“currency_code”:”USD”,”value”:30.95,”breakdown”:{“item_total”:{“currency_code”:”USD”,”value”:23.95},”shipping”:{“currency_code”:”USD”,”value”:7},”tax_total”:{“currency_code”:”USD”,”value”: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 = ‘