WebSite X5Help Center

 
Graeme G.
Graeme G.
User

PayPal Subscription HTML codes  en

Author: Graeme G.
Visited 148, Followers 2, Shared 0  

Hi for some reason I can only get 1 paypal subsciption button to appear on my website see here and attached, there should be buttons below each marketing package https://graemegorrie.co.uk/marketing-packages.html but it only appears below the essentials package?

Posted on the
3 ANSWERS
Paul M.
Paul M.
Moderator
Best User of the month EN

Hello Graeme,

Where are you taking this code from?  I see errors in the source code of the page.  If you point me to the source code for the PayPal buttons then I will help you integrate this properly into your WebSite X5 page.

Kind regards,

Paul

Search the WebSite X5 Help Center

Read more
Posted on the from Paul M.
Graeme G.
Graeme G.
User
Author

Hi I am just lifting codes from PayPal subscription buttons, they work fine in the first package but after that they don't. Yet they work find across this site of mine for example https://www.bonnytongolfclub.com/join-bonnyton.html

Read more
Posted on the from Graeme G.
Paul M.
Paul M.
Moderator
Best User of the month EN

These two sites use completely different methods to generate the PayPal buttons.

The Bonnyton Golf Club site uses simple HTML hosted buttons:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"></div><div><input type="hidden" name="cmd" value="_s-xclick"></div><div><input type="hidden" name="hosted_button_id" value="NDHZCYUK5NC74"></div><div><input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!"></div><div><img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"></div><div></form>

Whereas your own personal site uses JavaScript:

<script src="https://www.paypal.com/sdk/js?client-id=AUOEbTPxIps8nv2jVXnclncgSl94480joYQF0WcdTLa0VbJ_CR-122hS1Wo1XCq-phh5FPFXJJGufsH0&vault=true" data-sdk-integration-source="button-factory"></script> <script> paypal.Buttons({ style: { shape: 'pill', color: 'gold', layout: 'horizontal', label: 'subscribe', }, createSubscription: function(data, actions) { return actions.subscription.create({ 'plan_id': 'P-9TC580754A189493BL36HGSY' }); }, onApprove: function(data, actions) { alert(data.subscriptionID); } }).render('#paypal-button-container'); </script>

The PayPal source code repository should offer detailed instructions on how to implement the JavaScript properly.  I suspect that each button will require a unique identity.

Or you can stick with your existing working buttons, as below:

Make a PayPal button

Read more
Posted on the from Paul M.