Pay here

Welcome to our website!

<div id="smart-button-container">

<div style="text-align: center;">

<div id="paypal-button-container"></div>

</div>

</div>

<script src="https://www.paypal.com/sdk/js?client-id=ATOczWh39WaxFmD3-sGcIbNDjAp-XoFG-Qz9LVuQaO_3V3YTWeKth2F5vBCdyVbLzntKOws0Y7w3mcMJ&enable-funding=venmo&currency=USD" data-sdk-integration-source="button-factory"></script>

<script>

function initPayPalButton() {

paypal.Buttons({

style: {

shape: 'rect',

color: 'gold',

layout: 'vertical',

label: 'pay',

},


createOrder: function(data, actions) {

return actions.order.create({

purchase_units: [{"description":"You must add 3.8% (online fee) to your payment","amount":{"currency_code":"USD","value":1.04,"breakdown":{"item_total":{"currency_code":"USD","value":1},"shipping":{"currency_code":"USD","value":0},"tax_total":{"currency_code":"USD","value":0.04}}}}]

});

},


onApprove: function(data, actions) {

return actions.order.capture().then(function(details) {

alert('Transaction completed by ' + details.payer.name.given_name + '!');

});

},


onError: function(err) {

console.log(err);

}

}).render('#paypal-button-container');

}

initPayPalButton();

</script>



Leave a Reply

Your email address will not be published. Required fields are marked *