i2-Services, Inc. Forums

Full Version: How to set up Paypal recurring payments
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

Can you please set up a fake PayPal subscriptions (recurring payments) button and edit the paypal button templates and the paypal_config.php file templates below?

I want that my members that paying for Sub-Group 1 access will pay $10 every 30 days recurring payments.

My paypal button info.

Subscription Name: Level 1 Access
Reference Item Number: 001

Subscription price: $10
Length of each billing cycle 30 Days


Thanks

Mikael.

------------- Start Pay Pal button -----------------

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="My@PayPalEmail.com">
<input type="hidden" name="item_name" value="Level 1 Access">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://SuccessfulPaymentURL.com">
<input type="hidden" name="cancel_return" value="http://CancelPaymentURL.com">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-SubscriptionsBF">
<input type="hidden" name="a3" value="10.00">
<input type="hidden" name="p3" value="30">
<input type="hidden" name="t3" value="D">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
</form>

------------- End Pay Pal button -----------------


------------- Start paypal_config.php file -----------------
<?php


////////////////////////////////////////////////////////////////
// New Account Example PayPal Code
////////////////////////////////////////////////////////////////

if($paypal[item_number] == "button_item_name") {

$account_length_days = "365"; // Set # Of Days or "0" for no expiration
$sub_groups = ",1,"; // Set Sub-Group access. Start and end with commas

$FIELD[FIELD1] = "$paypal[field_name_here]";
$FIELD[FIELD2] = "$paypal[field_name_here]";
$FIELD[FIELD3] = "$paypal[field_name_here]";
$FIELD[FIELD4] = "$paypal[field_name_here]";
$FIELD[FIELD5] = "$paypal[field_name_here]";
$FIELD[FIELD6] = "$paypal[field_name_here]";
$FIELD[FIELD7] = "$paypal[field_name_here]";
$FIELD[FIELD8] = "$paypal[field_name_here]";
$FIELD[FIELD9] = "$paypal[field_name_here]";
$FIELD[FIELD10] = "$paypal[field_name_here]";
$FIELD[FIELD11] = "$paypal[field_name_here]";
$FIELD[FIELD12] = "$paypal[field_name_here]";
$FIELD[FIELD13] = "$paypal[field_name_here]";
$FIELD[FIELD14] = "$paypal[field_name_here]";
$FIELD[FIELD15] = "$paypal[field_name_here]";
$FIELD[FIELD16] = "$paypal[field_name_here]";
$FIELD[FIELD17] = "$paypal[field_name_here]";
$FIELD[FIELD18] = "$paypal[field_name_here]";
$FIELD[FIELD19] = "$paypal[field_name_here]";
$FIELD[FIELD20] = "$paypal[field_name_here]";

$create_account = "1"; // Leave this as is "1"

}


////////////////////////////////////////////////////////////////
// Existing Account Example Code --> Update Record
////////////////////////////////////////////////////////////////

if($paypal[item_number] == "upgrade_button_item_name") {

$account_length_days = "30"; // Set # Of Days to Add to Account Expiration
$sub_groups = ",2,"; // Set Sub-Group access. Start and end with commas

$create_account = "1"; // Leave this as is "1"

}
////////////////////////////////////////////////////////////////



?>
------------- End paypal_config.php file -----------------
Try:

Code:
if($paypal[item_name] == "Level 1 Access") {

   $account_length_days     = "30";           // Set # Of Days or "0" for no expiration
   $sub_groups              = "0";           // Set Sub-Group access. Start and end with commas

   $create_account          = "1";             // Leave this as is "1"

}


Also create a support ticket at:

http://www.i2-services.com/helpdesk/

So I can send you an updated file.

Thanks

Hello!

This is a working PayPal button for recurring payments and
the paypal_config.php file for this setting below!


My paypal button info.

Subscription Name: Level 1 Access
Reference Item Number: 001

Subscription price: $10
Length of each billing cycle 30 Days

You only need to change to your paypal email. If you change
subscription name or sub-groups it will not work.


------------- Start Pay Pal button -----------------



<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="your@PayPalEmail.com">
<input type="hidden" name="item_name" value="Level 1 Access">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-SubscriptionsBF">
<input type="hidden" name="a3" value="10.00">
<input type="hidden" name="p3" value="30">
<input type="hidden" name="t3" value="D">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
</form>


------------- End Pay Pal button -----------------


------------- Start paypal_config.php file -----------------

<?php


////////////////////////////////////////////////////////////////
// New Account Example PayPal Code
////////////////////////////////////////////////////////////////

if($paypal[item_name] == "Level 1 Access") {

$account_length_days = "30"; // Set # Of Days to Add to Account Expiration
$sub_groups = ",0,"; // Set Sub-Group access. Start and end with commas

$create_account = "1"; // Leave this as is "1"

}


////////////////////////////////////////////////////////////////
// Existing Account Example Code --> Update Record
////////////////////////////////////////////////////////////////

if($paypal[item_number] == "Level 1 Access") {

$account_length_days = "30"; // Set # Of Days to Add to Account Expiration
$sub_groups = ",0,"; // Set Sub-Group access. Start and end with commas

$create_account = "1"; // Leave this as is "1"

}
////////////////////////////////////////////////////////////////



?>
-----------------------------------
Reference URL's