How do I embed a paypal button in a brizy cloud pro plan website? Is there another way to sell something on the site I'm not aware of?
How do I embed a paypal button in a brizy cloud pro plan website? Is there another way to sell something on the site I'm not aware of?
-
Hello Clifford,
Thank you for your message and sorry for the late response! From 27-31 of August, Brizy Support was not available.
Regarding what you said, try and use this code to embed the paypal button: <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=sb&enable-funding=venmo¤cy=USD" data-sdk-integration-source="button-factory"></script> <script> function initPayPalButton() { paypal.Buttons({ style: { shape: 'pill', color: 'gold', layout: 'vertical', label: 'pay', }, createOrder: function(data, actions) { return actions.order.create({ purchase_units: [{"description":"The #Adtalk Walkthrough in 7 Days","amount":{"currency_code":"USD","value":200}}] }); }, 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 = '<h3>Thank you for your payment!</h3>'; // Or go to another URL: actions.redirect('thank_you.html'); }); }, onError: function(err) { console.log(err); } }).render('#paypal-button-container'); } initPayPalButton(); </script>
And the button will be shown in the preview - https://jmp.sh/n3Y024I
Hope this helps and made things clear for you! If you have any other questions or encounter some problems, please feel free to ask! We will be happy to help.
Have a nice day and best regards,
Doina0
Please sign in to leave a comment.
Comments
1 comment