• limeat

    (@limeat)


    Hi. I am creating PayPal subscriptions for our products, but am finding it very difficult to style the PayPal button in the following script:

     
    
    <div id="paypal-button-container-P-5H541515HP9014533MYWPGPQ"></div>
    
    <script src="https://www.paypal.com/sdk/js?client-id=sb&vault=true&intent=subscription" data-sdk-integration-source="button-factory"></script>
    
    <script>
    
    ? paypal.Buttons({
    
    ????? style: {
    
    ????????? shape: 'rect',
    
    ????????? color: 'gold',
    
    ????????? layout: 'vertical',
    
    ????????? label: 'subscribe'
    
    ????? },
    
    ????? createSubscription: function(data, actions) {
    
    ??????? return actions.subscription.create({
    
    ????????? /* Creates the subscription */
    
    ????????? plan_id: 'P-5H541515HP9014533MYWPGPQ'
    
    ??????? });
    
    ????? },
    
    ????? onApprove: function(data, actions) {
    
    ??????? alert(data.subscriptionID); // You can add optional success message for the subscriber here
    
    ????? }
    
    ? }).render('#paypal-button-container-P-5H541515HP9014533MYWPGPQ'); // Renders the PayPal button
    
    </script>

    I currently use the free version of Max Buttons.

    Either with the free or paid version, is it possible to add such a script to a button and use the PayPal icon?

    Many thanks
    Sarah

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bas Schuiling

    (@basszje)

    Hi. None of this really, since the result is a div and not a button. The external script maybe creates a button. Perhaps Paypal also has options for buttons with a link on it and all? Then that part would be possible.

    The javascript you would have to include manually.

    Thread Starter limeat

    (@limeat)

    Dear Bas
    Thanks for your reply. and apologies for my delay in replying.
    I have since discovered that I can use a https link rather than a script.

    However, what I would really like to do (for customer accessibility and my own ease) is to style a button with the hex f0c54f for a compliant background, the PayPal Subscribe icon / text, the add my own text, such as “Pay GBP 10 now then <br>GBP 10.00 a month for 6 months”.

    That would greatly increase my work speed as I have a disability myself, and it would be accessible to blind people (our main target market segment) who use JAWS or VoiceOver.


    Do you know whether that would be possible?

    Thanks again!

    Sarah

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add a PayPal subscription script and logo to a button’ is closed to new replies.