PayPal Express Checkout

Home Forums Quform WordPress PayPal Express Checkout

This topic is: resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32194
    Labella
    Participant

    Good morning, I would like to have a PayPal Express Checkout button in the confirmation of the form
    In order to make it working, I should put this div in the confirmation message:

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

    and these scripts in the custom JS pane:

     <script src='https://www.paypal.com/sdk/js?client-id=xxxxxxxxxxxxxxx&currency=EUR' data-sdk-integration-source='button-factory'></script>
    
    <script>
    paypal.Buttons({
    style: {
    shape: 'rect',
    color: 'gold',
    layout: 'horizontal',
    label: 'pay',
    tagline: true
    },
    createOrder: function(data, actions) {
    return actions.order.create({
    purchase_units: [{
    amount: {
    value: '$amount', currency: 'EUR'
    }, custom_id: '$customer_id'
    }]
    });
    },
    onApprove: function(data, actions) {
    return actions.order.capture().then(function(details) {
    alert('Transaction completed by ' + details.payer.name.given_name + '!');
    });
    }
    }).render('#paypal-button-container');
    </script>
    
    ";
     

    where $amount and $customer_id should be quform fields

    Do you think this is possible?

    #32202
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    • This reply was modified 3 years, 5 months ago by Ally.
    #32219
    Labella
    Participant

    It works! Great! Thank you

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy