Dynamic payment calculation

  • nschivley
    Asked on January 13, 2017 at 4:37 PM

    I want to recreate the form located here: 

    https://wnysc.com/registration-form-attendee/

    It is an attendee registration form but the cost of the registration is dynamic. The cost is determined by the selections (number of attendees, which functions attending etc.) made in the form.  

    Is it possible to pass this dynamic cost value to PayPal in order to make the payment?  I see where I can "create a product" with a set cost, but this is different.  It's not a set cost.  

    Does anyone know of any way to accomplish this?

     

  • Mike_G JotForm Support
    Replied on January 14, 2017 at 1:45 AM

    I have checked the form in the website you have included in your post. And yes, it is possible to accomplish such form here in Jotform.

    I have tried recreating the said form here in Jotform.

    https://www.jotformpro.com/form/70131158208952

    The total field on my sample form above is a PayPal payment field.

    I have used the "Form Calculation widget" (hidden on the form) for the computation.

    https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget

    Dynamic payment calculation Image 1 Screenshot 30

    Then, from the Form Calculation widget, the amount will be passed to the PayPal field.

    I have set up the PayPal field so it will get the total amount from the widget.

    Here's a guide on how you can do that: https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field

     

    Dynamic payment calculation Image 2 Screenshot 41

    I would suggest you clone the sample form above to your account so you can better inspect it.

    https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    And if you need any further assistance, please feel free to contact us again anytime and we will be glad to help you.

    Thank you.

  • nschivley
    Replied on January 15, 2017 at 1:44 PM

    Thank you - this is very helpful!  Is there any way to keep the user on the site and not have them redirected to a PayPal page to make payment?  They have a PayPal Pro account.

  • Kevin Support Team Lead
    Replied on January 15, 2017 at 7:51 PM

    If your submitter chooses the option to pay with a PayPal account they will be always redirected to the PayPal payment page. 

    However, since you're using PayPal Pro you could hide the PayPal option and leave the cc option only displayed in your form, this way you avoid them to be redirected outside your website. 

    If you decide to hide the PayPal option in your form, then you only need to inject this CSS code: 

    [data-type="control_paypalpro"] .form-address-table tr:nth-child(2) td:nth-child(2) {

        display: none;

    }

    This guide will help you to inject it: How-to-Inject-Custom-CSS-Codes

    Here's the link to a sample form with this code applied: https://www.jotformpro.com/form/62855971295975 

    Do note too, that you can redirect your submitter to your website again once the payment has been completed on PayPal, here's a guide that will help you to change the thank you page with your custom link: Redirecting-Users-to-a-Different-Page

    Hope this helps. 

  • nschivley
    Replied on January 16, 2017 at 9:07 AM

    I have a question regarding the API credentials from PayPal.  There are 3 different options for requesting API credentials.  For the PayPal Pro integration, do I request:

    1. Pre-built payment solution

    2. PayPal Checkout SDK Integration

    3. NVP/SOAP API Integration?

     

    See attached screenshot for my options.  Thanks! Dynamic payment calculation Image 1 Screenshot 20

  • Özlem JotForm Developer
    Replied on January 16, 2017 at 10:04 AM

    Hi,

    I have opened a new thread for your issue about API credentials from PayPal.

    Please follow your issue from this thread: https://www.jotform.com/answers/1035588 

    Thank you.