Mobile app version of vmapp.org
Login or Join
Fox8124981

: Paypal - specify limited or indefinite subscription service I'm creating a paypal check-out form for a subscription service. Paypal allows me to specify the "reacurring times" of the subscription

@Fox8124981

Posted in: #Paypal

I'm creating a paypal check-out form for a subscription service.

Paypal allows me to specify the "reacurring times" of the subscription with the "srt" option: cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables
I would like to create a drop-down list that allows the customer to select either an indefinite number of times or a specific number of times.

The select would probably look like this, however, I'm unsure how to specify an unlimited duration. Should I leave the value blank, or is there a way not to send the variable through at all?:

<select name="srt">
<option value="1"></option> <!-- One time -->
<option value="9"></option> <!-- Nine times -->
<option value=""></option> <!-- Indefinitely?? -->
</select>


I'm unsure how to handle this use case. Any help would be appreciated. Thanks!

Update:

It also looks like its impossible to specify srt="1" (the first option). When this option is selected, paypal rejects the link as invalid because a subscription service must be more than one time. From my understanding. Only wants to purchase one interval, then another option: "src" must be set to "0".

Can I do this with one html drop-down, or do I need to use javascript to respond to user input and then change hidden form values accordingly?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Fox8124981

1 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

According to the PayPal documentation on the srt parameter:


Recurring Times. This is the number of payments which will occur at the regular rate. If omitted, payment will continue to recur at the regular rate until the subscription is cancelled


So you would have to omit the parameter to get to get recurring payments until cancelled. This means that you would need to use some JavaScript to respond to the select menu and add a hidden field to a form with this parameter when it is required.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme