- SeastrideAsked on October 16, 2014 at 11:42 PM
The form pulls values from checkboxes, that add up to a total.
This total should then be billed as recurring in paypal. (similar to a subscription)
Yet, subscription only lets you do a fixed amount, not a calculated field. Help?
- JotForm SupportWelvinAnswered on October 17, 2014 at 08:28 AM
Unfortunately, it's not possible. Maybe, the source codes method and altering the properties of the recurring payment items. However, I haven't tried it yet.
- SeastrideAnswered on October 17, 2014 at 11:28 AM
Would it be possible, in lieue of using the payment wizard, to implement the raw source for a paypal button (see below) and then pass the CALCULATED field value to the AMOUNT variable in the paypal source? (right now you'll see the amount variable is a text field set to $5)
unhosted paypal code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" >
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="U2ZRWJ4HXPV76">
<input type="hidden" name="lc" value="CA">
<input type="hidden" name="item_name" value="test">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="src" value="1">
<input type="hidden" name="a3" value="100.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="W">
<input type="hidden" name="currency_code" value="CAD">
Amount: $<input type="text" maxlength="200" style="width:50px;" name="a3" value="5.00"> CAD<br />
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHosted">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
- JotForm SupportWelvinAnswered on October 17, 2014 at 11:51 AM
Yes, I think that's possible. We can use the Send Post method for that: http://www.jotform.com/help/213-Send-POST-Data-From-JotForm-Using-PHP-in-Custom-Thank-You-Page.
So...I think there are two redirects;
1. The form will be submitted with the calculation values on it pass to the thank you page with the Paypal codes in it.
2. Thank you page redirects to Paypal recurring payment page.
Let me try to create an example. Please stay tune :)
- JotForm SupportWelvinAnswered on October 17, 2014 at 12:23 PM
Ok! I have a success here.
1. I changed the form structure - using Calculation widget for the total: http://www.jotformpro.com/form/42894831323963.
2. Enabled Send Post Method to capture the Total calculation and forward it to the Paypal hosted subscription button:
3. Modified the Paypal button source and add some scripts to it: https://shots.jotform.com/welvin/php/paypal-recurring.txt
4. Uploaded this PHP file to our repository and use it as Thank You URL for the form: https://www.jotform.com/help/38-Redirecting-Users-to-a-Different-Page.
a. The form will be submitted - you will receive it via email and to your form submissions page.
b. The form will be redirected to the PHP page where Paypal source is there and post data script to capture the total amount from the form.
c. Then the Thank you PHP page redirects to Paypal for Payment.
Please submit to the form above to see the output. Let me know if you have any further questions.
PS. The scripts are ready so you can use it if you want to.
- SeastrideAnswered on October 17, 2014 at 12:41 PM
This worked! By the way, there are countless requests in the forums here to have a CUSTOM FIELD or INPUT FIELD associate with SUBSCRIPTIONS via the payment wizard.
This workaround addresses this issue and allows users to dynamically create the amount on their forms, then forward to paypal accordingly.
Outstanding support Welvin, thank you!
- BenAnswered on October 17, 2014 at 01:48 PM
In my colleagues name, you are welcome. I am glad to hear that you have liked the solution provided by my colleague and I am sure that we will all be using it in the future where needed.
Do let us know if you have any further questions.
- clonlaraJennAnswered on February 20, 2017 at 10:42 AM
I see the original form was disabled. Could someone make a demo for me to see how this worked?
- AIDANAnswered on February 20, 2017 at 12:12 PM
I believe you have sent this request in a separate thread here: https://www.jotform.com/answers/1069634
- JotForm SupportJim_RAnswered on April 14, 2017 at 12:12 PM
@mitchellb - To give way to the OP, I moved your post to a separate thread https://www.jotform.com/answers/1119580
We'll have it addressed there shortly.