Home › Forums › Quform WordPress › PayPal Express Checkout
This topic is: resolved
- This topic has 2 replies, 2 voices, and was last updated 4 years ago by Labella.
Viewing 3 posts - 1 through 3 (of 3 total)
- AuthorPosts
- November 12, 2020 at 10:26 am #32194LabellaParticipant
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¤cy=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?
November 13, 2020 at 10:22 am #32202AllySupport StaffYou 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 4 years ago by Ally.
November 16, 2020 at 11:32 am #32219LabellaParticipantIt works! Great! Thank you
- AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.