WebSite X5Help Center

 
Graeme G.
Graeme G.
User

PayPal Subscription HTML codes  en

Autor: Graeme G.
Visitado 299, Followers 2, Compartido 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?

Publicado en
3 RESPUESTAS
Paul M.
Paul M.
Moderator
Usuario del mes 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

Leer más
Publicado en de Paul M.
Graeme G.
Graeme G.
User
Autor

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

Leer más
Publicado en de Graeme G.
Paul M.
Paul M.
Moderator
Usuario del mes 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

Leer más
Publicado en de Paul M.