Web Global Net Web Application & Web Development Project Center

Technical Issues => PayPal Related => Topic started by: admin on May 13, 2013, 05:37: PM



Title: Making a 30 Day free trail with only 1 payment after
Post by: admin on May 13, 2013, 05:37: PM
a normal paypal button would look like this

To only have one payment with a subscription button you will need to remove the "srt" variable. Remove the following statement:

<input type="hidden" name="srt" value="2">

You will need to ensure the "src" variable has a value of 0:

<input type="hidden" name="src" value="0">

 <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
                                <p>
                                  <span class="pagetext_11_pt">
                                  <input type="hidden" name="cmd" value="_xclick-subscriptions" />
                                  <input type="hidden" name="bn" value="button" />
                                  <input type="hidden" name="business" value="<?php echo $row_rsfees['rm_paypal_email']; ?>" />
                                  <input type="hidden" name="item_name" value="<?php echo $row_rsclassecho['class_id']; ?> - <?php echo $row_rsclassecho['high_school']; ?> - <?php echo $row_rsclassecho['use_reason']; ?> Reunion Activation 30 Day Free Trial" />
                                  <input type="hidden" name="item_number" value="30 Day Free Trial - <?php echo $row_rsclassecho['class_id']; ?> <?php echo $row_rsclassecho['high_school']; ?>" />
                                  <input type="hidden" name="currency_code" value="USD" />
                                  <input type="hidden" name="a1" value="0" />
                                  <input type="hidden" name="p1" value="1" />
                                  <input type="hidden" name="t1" value="M" />
                                  <input type="hidden" name="a3" value="<?php echo $deferfee ?>" />
                                  <input type="hidden" name="p3" value="1" />
                                  <input type="hidden" name="t3" value="M" />
                                  <input type="hidden" name="image_url" value="/assets/reunionmanagerpaypalfree.png">
                                  <input type="hidden" name="return" value="/paypalconfirm_new.php?class_id=<?php echo $_GET['class_id']; ?>&pay=1" />
                                  <input type="hidden" name="cancel_return" value="/activate_event.php?class_id=<?php echo $_GET['class_id']; ?>" />
                                 <input type="hidden" name="srt" value="2" />
                                  <input type="hidden" name="sra" value="1" />
                                  <input type="hidden" name="receiver_email" value="<?php echo $row_rsfees['rm_paypal_email']; ?>" />
                                  <input type="hidden" name="no_shipping" value="1" />
                                  <input type="hidden" name="no_note" value="1" />
                                  <input type="hidden" name="src" value="0" />
                                  <input type="image" src="assets/orderbuttonfreetrial.png" border="0" name="submit" target="blank" alt="Make payments for Reunion Tickets with PayPal - it's fast, free and secure!" />
                                  </span></p>
                                <p class="pagetext_11_pt"><strong>Please Note: </strong>PayPal will indicate you are making 2 payments, which technically is true.

  Your first payment                                       is for <strong>$0</strong> which covers the <strong>30 Day Free Trial  Period</strong>.

  

                                Cancel anytime before the 30 days is over and the second payment will be canceled.               </p>
                              </form>

The trick is to take out the <input type="hidden" name="srt" value="2" /> entirely. as this can only be set to 2 or above - by taking it out it is for one time based on the reoccurring time frame in the above button this is monthly so by taking it out only 1 more payment would be made at the end of the 30 day trail period.