paypal recurring payment integrated with codeigniter

First of all thanks to paypal
you can also follow this link to see the documentation written here
https://www.paypal.com/en_US/ebook/PP_NVPAPI_DeveloperGuide/index.html

but here i am describing how I have integrated this api into codeigniter

Step1:
create a folder in controller paypalnvp

inside that create a file CreateRPProfileReceipt.php

code of CreateRPProfileReceipt.php

load->library('auth');

$this->load->library(‘session’);

}

function index() {

$this->load->model(‘callerservice’);

//echo “aaaaaaaaaaaaaaaaa”;exit;

$subscriberId =$_POST[‘subscriberId’];

$paymentType =”;#urlencode( $_POST[‘paymentType’]);

$firstName =urlencode( $_POST[‘firstName’]);

$lastName =urlencode( $_POST[‘lastName’]);

$creditCardType =urlencode( $_POST[‘creditCardType’]);

$creditCardNumber = urlencode($_POST[‘creditCardNumber’]);

$expDateMonth =urlencode( $_POST[‘expDateMonth’]);

// Month must be padded with leading zero

$padDateMonth = str_pad($expDateMonth, 2, ‘0’, STR_PAD_LEFT);

$expDateYear =urlencode( $_POST[‘expDateYear’]);

$cvv2Number = urlencode($_POST[‘cvv2Number’]);

$address1 = urlencode($_POST[‘address1’]);

$address2 = urlencode($_POST[‘address2’]);

$city = urlencode($_POST[‘city’]);

$state =urlencode( $_POST[‘state’]);

$zip = urlencode($_POST[‘zip’]);

$amount = urlencode($_POST[‘amount’]);

$currencyCode=”USD”;

$profileDesc = urlencode($_POST[‘profileDesc’]);

$billingPeriod = urlencode($_POST[‘billingPeriod’]);

$billingFrequency = urlencode($_POST[‘billingFrequency’]);

$totalBillingCycles = urlencode($_POST[‘totalBillingCycles’]);

$profileStartDateDay = $_POST[‘profileStartDateDay’];

// Day must be padded with leading zero

$padprofileStartDateDay = str_pad($profileStartDateDay, 2, ‘0’, STR_PAD_LEFT);

$profileStartDateMonth = $_POST[‘profileStartDateMonth’];

// Month must be padded with leading zero

$padprofileStartDateMonth = str_pad($profileStartDateMonth, 2, ‘0’, STR_PAD_LEFT);

$profileStartDateYear = $_POST[‘profileStartDateYear’];

$profileStartDate = urlencode($profileStartDateYear . ‘-‘ . $padprofileStartDateMonth . ‘-‘ . $padprofileStartDateDay . ‘T00:00:00Z’);

/* Construct the request string that will be sent to PayPal.

The variable $nvpstr contains all the variables and is a

name value pair string with & as a delimiter */

$nvpstr=”&AMT=$amount&CREDITCARDTYPE=$creditCardType&ACCT=$creditCardNumber&EXPDATE=”. $padDateMonth.$expDateYear.”&CVV2=$cvv2Number&FIRSTNAME=$firstName&LASTNAME=$lastName&STREET=$address1&CITY=$city&STATE=$state”.

“&ZIP=$zip&COUNTRYCODE=US&CURRENCYCODE=$currencyCode&PROFILESTARTDATE=$profileStartDate&DESC=$profileDesc&BILLINGPERIOD=$billingPeriod&BILLINGFREQUENCY=$billingFrequency&TOTALBILLINGCYCLES=$totalBillingCycles”;

$getAuthModeFromConstantFile = true;

//$getAuthModeFromConstantFile = false;

$nvpHeader = “”;

if(!$getAuthModeFromConstantFile) {

//$AuthMode = “3TOKEN”; //Merchant’s API 3-TOKEN Credential is required to make API Call.

//$AuthMode = “FIRSTPARTY”; //Only merchant Email is required to make EC Calls.

$AuthMode = “THIRDPARTY”; //Partner’s API Credential and Merchant Email as Subject are required.

} else {

if(!empty($this->callerservice->API_UserName) && !empty($this->callerservice->API_Password) && !empty($this->callerservice->API_Signature) && !empty($this->callerservice->subject)) {

$AuthMode = “THIRDPARTY”;

}else if(!empty($this->callerservice->API_UserName) && !empty($this->callerservice->API_Password) && !empty($this->callerservice->API_Signature)) {

$AuthMode = “3TOKEN”;

}else if(!empty($this->callerservice->subject)) {

$AuthMode = “FIRSTPARTY”;

}

}

switch($AuthMode) {

case “3TOKEN” :

$nvpHeader = “&PWD=”.urlencode($this->callerservice->API_Password).”&USER=”.urlencode($this->callerservice->API_UserName).”&SIGNATURE=”.urlencode($this->callerservice->API_Signature);

break;

case “FIRSTPARTY” :

$nvpHeader = “&SUBJECT=”.urlencode($this->callerservice->subject);

break;

case “THIRDPARTY” :

$nvpHeader = “&PWD=”.urlencode($this->callerservice->API_Password).”&USER=”.urlencode($this->callerservice->API_UserName).”&SIGNATURE=”.urlencode($this->callerservice->API_Signature).”&SUBJECT=”.urlencode($this->callerservice->subject);

break;

}

$nvpstr = $nvpHeader.$nvpstr;

/* Make the API call to PayPal, using API signature.

The API response is stored in an associative array called $resArray */

$resArray=$this->callerservice->hash_call(“CreateRecurringPaymentsProfile”,$nvpstr);

/* Display the API response back to the browser.

If the response from PayPal was a success, display the response parameters’

If the response was an error, display the errors received using APIError.php.

*/

$ack = strtoupper($resArray[“ACK”]);

//print_r($resArray);

if($ack!=”SUCCESS”) {

$data[‘errorMsg’]=$resArray;

$data[‘current_page’]=’membership’;

$data[‘logged_in’] = $this->auth->logged_in();

$this->load->view(‘header’,$data);

$this->load->view(‘paypal/apierror’, $data);

$this->load->view(‘footer’);

}

else{

redirect(‘successfully_paid_subscriber/’.$subscriberId);

}

}

}

?>

in the model folder create a model file callerservice.php

code is given below:

<?php

class callerservice extends Model {

var $API_UserName;

var $API_Password;

var $API_Signature;

var $API_Endpoint ;

var $version;

var $subject;
var $CI;
var $USE_PROXY;
var $PROXY_HOST;
var $PROXY_PORT;

function callerservice()
{
// Call the Model constructor
parent::Model();

$this->CI =& get_instance();
$this->CI->load->helper(‘url’);
$this->CI->load->helper(‘form’);
$this->CI->load->library(‘session’);

$this->CI->load->config(‘paypal_constants’);

$this->API_UserName = $this->CI->config->item(‘API_USERNAME’);

$this->API_Password = $this->CI->config->item(‘API_PASSWORD’);

$this->API_Signature = $this->CI->config->item(‘API_SIGNATURE’);

$this->API_Endpoint = $this->CI->config->item(‘API_ENDPOINT’);

$this->subject = $this->CI->config->item(‘SUBJECT’);

$this->version = $this->CI->config->item(‘VERSION’);

$this->USE_PROXY = $this->CI->config->item(‘USE_PROXY’);

$this->PROXY_HOST = $this->CI->config->item(‘PROXY_HOST’);

$this->PROXY_PORT = $this->CI->config->item(‘PROXY_PORT’);

}

/**
* hash_call: Function to perform the API call to PayPal using API signature
* @methodName is name of API  method.
* @nvpStr is nvp string.
* returns an associtive array containing the response from the server.
*/

function hash_call($methodName,$nvpStr)
{
//declaring of global variables
//global $API_Endpoint,$version,$API_UserName,$API_Password,$API_Signature,$nvp_Header, $subject;

//setting the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$this->API_Endpoint);
curl_setopt($ch, CURLOPT_VERBOSE, 1);

//turning off the server and peer verification(TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
//if USE_PROXY constant set to TRUE in Constants.php, then only proxy will be enabled.
//Set proxy name to PROXY_HOST and port number to PROXY_PORT in constants.php
if($this->USE_PROXY)
curl_setopt ($ch, CURLOPT_PROXY, $this->PROXY_HOST.”:”.$this->PROXY_PORT);

//check if version is included in $nvpStr else include the version.
if(strlen(str_replace(‘VERSION=’, ”, strtoupper($nvpStr))) == strlen($nvpStr)) {
$nvpStr = “&VERSION=” . urlencode($this->version) . $nvpStr;
}

$nvpreq=”METHOD=”.urlencode($methodName).$nvpStr;

//setting the nvpreq as POST FIELD to curl
curl_setopt($ch,CURLOPT_POSTFIELDS,$nvpreq);

//getting response from server
$response = curl_exec($ch);

//convrting NVPResponse to an Associative Array
$nvpResArray=$this->deformatNVP($response);
$nvpReqArray=$this->deformatNVP($nvpreq);
$ASESSION[‘nvpReqArray’]=$nvpReqArray;

if (curl_errno($ch)) {
// moving to display page to display curl errors
$ASESSION[‘curl_error_no’]=curl_errno($ch) ;
$ASESSION[‘curl_error_msg’]=curl_error($ch);
print_r($ch);exit;
//$this->redirect(‘error’);
} else {
//closing the curl
curl_close($ch);
}
$this->CI->session->set_userdata($ASESSION);

return $nvpResArray;
}

/** This function will take NVPString and convert it to an Associative Array and it will decode the response.
* It is usefull to search for a particular key and displaying arrays.
* @nvpstr is NVPString.
* @nvpArray is Associative Array.
*/

function deformatNVP($nvpstr)
{

$intial=0;
$nvpArray = array();

while(strlen($nvpstr)){
//postion of Key
$keypos= strpos($nvpstr,’=’);
//position of value
$valuepos = strpos($nvpstr,’&’) ? strpos($nvpstr,’&’): strlen($nvpstr);

/*getting the Key and Value values and storing in a Associative Array*/
$keyval=substr($nvpstr,$intial,$keypos);
$valval=substr($nvpstr,$keypos+1,$valuepos-$keypos-1);
//decoding the respose
$nvpArray[urldecode($keyval)] =urldecode( $valval);
$nvpstr=substr($nvpstr,$valuepos+1,strlen($nvpstr));
}
return $nvpArray;
}

}
?>

then create a file paypal_constants.php in config folder

<?php

class callerservice extends Model {

var $API_UserName;

var $API_Password;

var $API_Signature;

var $API_Endpoint ;

var $version;

var $subject;
var $CI;
var $USE_PROXY;
var $PROXY_HOST;
var $PROXY_PORT;

function callerservice()
{
// Call the Model constructor
parent::Model();

$this->CI =& get_instance();
$this->CI->load->helper(‘url’);
$this->CI->load->helper(‘form’);
$this->CI->load->library(‘session’);

$this->CI->load->config(‘paypal_constants’);

$this->API_UserName = $this->CI->config->item(‘API_USERNAME’);

$this->API_Password = $this->CI->config->item(‘API_PASSWORD’);

$this->API_Signature = $this->CI->config->item(‘API_SIGNATURE’);

$this->API_Endpoint = $this->CI->config->item(‘API_ENDPOINT’);

$this->subject = $this->CI->config->item(‘SUBJECT’);

$this->version = $this->CI->config->item(‘VERSION’);

$this->USE_PROXY = $this->CI->config->item(‘USE_PROXY’);

$this->PROXY_HOST = $this->CI->config->item(‘PROXY_HOST’);

$this->PROXY_PORT = $this->CI->config->item(‘PROXY_PORT’);

}

/**
* hash_call: Function to perform the API call to PayPal using API signature
* @methodName is name of API  method.
* @nvpStr is nvp string.
* returns an associtive array containing the response from the server.
*/

function hash_call($methodName,$nvpStr)
{
//declaring of global variables
//global $API_Endpoint,$version,$API_UserName,$API_Password,$API_Signature,$nvp_Header, $subject;

//setting the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$this->API_Endpoint);
curl_setopt($ch, CURLOPT_VERBOSE, 1);

//turning off the server and peer verification(TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
//if USE_PROXY constant set to TRUE in Constants.php, then only proxy will be enabled.
//Set proxy name to PROXY_HOST and port number to PROXY_PORT in constants.php
if($this->USE_PROXY)
curl_setopt ($ch, CURLOPT_PROXY, $this->PROXY_HOST.”:”.$this->PROXY_PORT);

//check if version is included in $nvpStr else include the version.
if(strlen(str_replace(‘VERSION=’, ”, strtoupper($nvpStr))) == strlen($nvpStr)) {
$nvpStr = “&VERSION=” . urlencode($this->version) . $nvpStr;
}

$nvpreq=”METHOD=”.urlencode($methodName).$nvpStr;

//setting the nvpreq as POST FIELD to curl
curl_setopt($ch,CURLOPT_POSTFIELDS,$nvpreq);

//getting response from server
$response = curl_exec($ch);

//convrting NVPResponse to an Associative Array
$nvpResArray=$this->deformatNVP($response);
$nvpReqArray=$this->deformatNVP($nvpreq);
$ASESSION[‘nvpReqArray’]=$nvpReqArray;

if (curl_errno($ch)) {
// moving to display page to display curl errors
$ASESSION[‘curl_error_no’]=curl_errno($ch) ;
$ASESSION[‘curl_error_msg’]=curl_error($ch);
print_r($ch);exit;
//$this->redirect(‘error’);
} else {
//closing the curl
curl_close($ch);
}
$this->CI->session->set_userdata($ASESSION);

return $nvpResArray;
}

/** This function will take NVPString and convert it to an Associative Array and it will decode the response.
* It is usefull to search for a particular key and displaying arrays.
* @nvpstr is NVPString.
* @nvpArray is Associative Array.
*/

function deformatNVP($nvpstr)
{

$intial=0;
$nvpArray = array();

while(strlen($nvpstr)){
//postion of Key
$keypos= strpos($nvpstr,’=’);
//position of value
$valuepos = strpos($nvpstr,’&’) ? strpos($nvpstr,’&’): strlen($nvpstr);

/*getting the Key and Value values and storing in a Associative Array*/
$keyval=substr($nvpstr,$intial,$keypos);
$valval=substr($nvpstr,$keypos+1,$valuepos-$keypos-1);
//decoding the respose
$nvpArray[urldecode($keyval)] =urldecode( $valval);
$nvpstr=substr($nvpstr,$valuepos+1,strlen($nvpstr));
}
return $nvpArray;
}

}
?>

in view folder create a folder paypal inside that create a file form.php

html code given below for form.php

<script language=”JavaScript”>
function generateCC(){
var cc_number = new Array(16);
var cc_len = 16;
var start = 0;
var rand_number = Math.random();

switch(document.CreateRPProfileForm.creditCardType.value)
{
case “Visa”:
cc_number[start++] = 4;
break;
case “Discover”:
cc_number[start++] = 6;
cc_number[start++] = 0;
cc_number[start++] = 1;
cc_number[start++] = 1;
break;
case “MasterCard”:
cc_number[start++] = 5;
cc_number[start++] = Math.floor(Math.random() * 5) + 1;
break;
case “Amex”:
cc_number[start++] = 3;
cc_number[start++] = Math.round(Math.random()) ? 7 : 4 ;
cc_len = 15;
break;
}

for (var i = start; i < (cc_len – 1); i++) {
cc_number[i] = Math.floor(Math.random() * 10);
}

var sum = 0;
for (var j = 0; j < (cc_len – 1); j++) {
var digit = cc_number[j];
if ((j & 1) == (cc_len & 1)) digit *= 2;
if (digit > 9) digit -= 9;
sum += digit;
}

var check_digit = new Array(0, 9, 8, 7, 6, 5, 4, 3, 2, 1);
cc_number[cc_len – 1] = check_digit[sum % 10];

document.CreateRPProfileForm.creditCardNumber.value = “”;
for (var k = 0; k < cc_len; k++) {
document.CreateRPProfileForm.creditCardNumber.value += cc_number[k];
}
}
function setDate() {

var dt = new Date();
dt = addMonth(dt,1);
document.CreateRPProfileForm.profileStartDateDay.options[dt.getDate()-1].selected = true;
document.CreateRPProfileForm.profileStartDateMonth.options[dt.getMonth()].selected = true;
for(index=0; index<document.CreateRPProfileForm.profileStartDateYear.options.length;index++)
{
if(document.CreateRPProfileForm.profileStartDateYear.options[index].value == dt.getFullYear())
{
document.CreateRPProfileForm.profileStartDateYear.options[index].selected = true;
break;
}
}

}
function addMonth(d,month){
t  = new Date (d);
t.setMonth(d.getMonth()+ month) ;
if (t.getDate() < d.getDate())
{
t.setDate(0);
}
return t;
}

</script>

<div>
<div>
<div></div>
<div>
<div>
<ul>
<li><a href=”#”>Beginner Traders</a></li>
<li><a href=”#”>Affiliates Program</a></li>
<li><a href=”#”>Advertising</a></li>
<li><a href=”#”>Disclaimer</a></li>
<li><a href=”#”>F.A.Q. </a></li>
<li><a href=”#”>Links</a></li>
<li><a href=”#”>Join Now</a></li>
<li><a href=”#”>Gift subscriptions</a></li>
</ul>
</div>
</div>
<div></div>
<div></div>
</div>
<div>
<div></div>
<div> <br>
<center>
<font size=2 color=black face=Verdana><b>Create Recurring Payments Profile</b></font>
<br><br>
<form method=”POST” action=”<?php echo base_url() ?>index.php/paypalnvp/CreateRPProfileReceipt” name=”CreateRPProfileForm”>
<input type=”hidden” name=”subscriberId” value=”<?php echo $subscriberId;?>”/>
<table width=600>
<tr>
<td align=right>First Name:</td>
<td align=left><input type=text size=30 maxlength=32 name=firstName value=John></td>
</tr>
<tr>
<td align=right>Last Name:</td>
<td align=left><input type=text size=30 maxlength=32 name=lastName value=Doe></td>
</tr>
<tr>
<td align=right>Card Type:</td>
<td align=left>
<select name=creditCardType onChange=”javascript:generateCC(); return false;”>
<option value=Visa selected>Visa</option>
<option value=MasterCard>MasterCard</option>
<option value=Discover>Discover</option>
<option value=Amex>American Express</option>
</select>
</td>
</tr>
<tr>
<td align=right>Card Number:</td>
<td align=left><input type=text size=19 maxlength=19 name=creditCardNumber></td>
</tr>
<tr>
<td align=right>Expiration Date:</td>
<td align=left><p>
<select name=expDateMonth>
<option value=1>01</option>
<option value=2>02</option>
<option value=3>03</option>
<option value=4>04</option>
<option value=5>05</option>
<option value=6>06</option>
<option value=7>07</option>
<option value=8>08</option>
<option value=9>09</option>
<option value=10>10</option>
<option value=11>11</option>
<option value=12>12</option>
</select>
<select name=expDateYear>
<option value=2005>2005</option>
<option value=2006>2006</option>
<option value=2007>2007</option>
<option value=2008>2008</option>
<option value=2009>2009</option>
<option value=2010>2010</option>
<option value=2011 selected>2011</option>
<option value=2012>2012</option>
<option value=2013>2013</option>
<option value=2014>2014</option>
<option value=2015>2015</option>
</select>
</p></td>
</tr>
<tr>
<td align=right>Card Verification Number:</td>
<td align=left><input type=text size=3 maxlength=4 name=cvv2Number value=962></td>
</tr>
<tr>
<td align=right><br><b>Profile Details:</b></td>
</tr>
<tr>
<td align=right>Profile Description:</td>
<td align=left><input type=text size=50 maxlength=100 name=profileDesc value=”Welcome to the world of shopping where you get everything”></td>
</tr>
<tr>
<td align=right>Billing Period:</td>
<td align=left>
<select name=billingPeriod>
<option value=Day>Day</option>
<option value=Week selected>Week</option>
<option value=SemiMonth>SemiMonth</option>
<option value=Month>Month</option>
<option value=Year>Year</option>
</select>
</td>
</tr>
<tr>
<td align=right>Billing Frequency:</td>
<td align=left><input type=text size=25 maxlength=100 name=billingFrequency value=”4″></td>
</tr>
<tr>
<td align=right>Total Billing Cycles:</td>
<td align=left><input type=text size=25 maxlength=100 name=totalBillingCycles value=””></td>
</tr>
<tr>
<td align=right>Profile Start Date:</td>
<td align=left>
<select name=profileStartDateDay>
<option value=1>01</option>
<option value=2>02</option>
<option value=3>03</option>
<option value=4>04</option>
<option value=5>05</option>
<option value=6>06</option>
<option value=7>07</option>
<option value=8>08</option>
<option value=9>09</option>
<option value=10>10</option>
<option value=11>11</option>
<option value=12>12</option>
<option value=13>13</option>
<option value=14>14</option>
<option value=15  selected>15</option>
<option value=16>16</option>
<option value=17>17</option>
<option value=18>18</option>
<option value=19>19</option>
<option value=20>20</option>
<option value=21>21</option>
<option value=22>22</option>
<option value=23>23</option>
<option value=24>24</option>
<option value=25>25</option>
<option value=26>26</option>
<option value=27>27</option>
<option value=28>28</option>
<option value=29>29</option>
<option value=30>30</option>
<option value=31>31</option>
</select>
<select name=profileStartDateMonth>
<option value=1>01</option>
<option value=2>02</option>
<option value=3>03</option>
<option value=4>04</option>
<option value=5>05</option>
<option value=6>06</option>
<option value=7 selected>07</option>
<option value=8>08</option>
<option value=9>09</option>
<option value=10>10</option>
<option value=11>11</option>
<option value=12>12</option>
</select>
<select name=profileStartDateYear>
<option value=2009>2009</option>
<option value=2010 selected>2010</option>
<option value=2011>2011</option>
<option value=2012>2012</option>
<option value=2013>2013</option>
<option value=2014>2014</option>
<option value=2015>2015</option>
<option value=2016>2016</option>
<option value=2017>2017</option>
</select>
</td>
</tr>

<tr>
<td align=right><br><b>Billing Address:</b></td>
</tr>
<tr>
<td align=right>Address 1:</td>
<td align=left><input type=text size=25 maxlength=100 name=address1 value=”1 Main St”></td>
</tr>
<tr>
<td align=right>Address 2:</td>
<td align=left><input type=text  size=25 maxlength=100 name=address2>(optional)</td>
</tr>
<tr>
<td align=right>City:</td>
<td align=left><input type=text size=25 maxlength=40 name=city value=”San Jose”></td>
</tr>
<tr>
<td align=right>State:</td>
<td align=left>
<select id=state name=state>
<option value=></option>
<option value=AK>AK</option>
<option value=AL>AL</option>
<option value=AR>AR</option>
<option value=AZ>AZ</option>
<option value=CA selected>CA</option>
<option value=CO>CO</option>
<option value=CT>CT</option>
<option value=DC>DC</option>
<option value=DE>DE</option>
<option value=FL>FL</option>
<option value=GA>GA</option>
<option value=HI>HI</option>
<option value=IA>IA</option>
<option value=ID>ID</option>
<option value=IL>IL</option>
<option value=IN>IN</option>
<option value=KS>KS</option>
<option value=KY>KY</option>
<option value=LA>LA</option>
<option value=MA>MA</option>
<option value=MD>MD</option>
<option value=ME>ME</option>
<option value=MI>MI</option>
<option value=MN>MN</option>
<option value=MO>MO</option>
<option value=MS>MS</option>
<option value=MT>MT</option>
<option value=NC>NC</option>
<option value=ND>ND</option>
<option value=NE>NE</option>
<option value=NH>NH</option>
<option value=NJ>NJ</option>
<option value=NM>NM</option>
<option value=NV>NV</option>
<option value=NY>NY</option>
<option value=OH>OH</option>
<option value=OK>OK</option>
<option value=OR>OR</option>
<option value=PA>PA</option>
<option value=RI>RI</option>
<option value=SC>SC</option>
<option value=SD>SD</option>
<option value=TN>TN</option>
<option value=TX>TX</option>
<option value=UT>UT</option>
<option value=VA>VA</option>
<option value=VT>VT</option>
<option value=WA>WA</option>
<option value=WI>WI</option>
<option value=WV>WV</option>
<option value=WY>WY</option>
<option value=AA>AA</option>
<option value=AE>AE</option>
<option value=AP>AP</option>
<option value=AS>AS</option>
<option value=FM>FM</option>
<option value=GU>GU</option>
<option value=MH>MH</option>
<option value=MP>MP</option>
<option value=PR>PR</option>
<option value=PW>PW</option>
<option value=VI>VI</option>
</select>
</td>
</tr>
<tr>
<td align=right>ZIP Code:</td>
<td align=left><input type=text size=10 maxlength=10 name=zip value=95131>(5 or 9 digits)</td>
</tr>
<tr>
<td align=right>Country:</td>
<td align=left>United States</td>
</tr>
<tr>
<td align=right><br>Amount:</td>
<td align=left><br><input type=text size=4 maxlength=7 name=amount value=1.00>USD</td>
</tr>
<tr>
<td/>
<td><input type=Submit value=Submit></td>
</tr>
</table>
</form>
</center>

<script language=”javascript”>
generateCC();
</script>

<div></div>
</div>
<div></div>
<div></div>
</div>
<div></div>
</div>
<div></div>

Advertisements
About

Work is fun!

Tagged with: , , , , , ,
Posted in PHP, PHP Frameworks, Tips And Tricks
2 comments on “paypal recurring payment integrated with codeigniter
  1. Ken says:

    It looks like you might have pasted the class “callerservice” twice instead of pasting in the paypal_constants.php contents. Any chance you can provide this? There are very few examples of Paypal integration with Codeigniter. Your work is appreciated!

  2. ashish says:

    hey i also noticed the same thing !!!
    can you please paste the code again ?
    anywaz great work

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Disclaimer
All content provided on this "tareqalam.com" blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner of [tareqalam.wordpress.com] will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
July 2010
M T W T F S S
« May   Aug »
 1234
567891011
12131415161718
19202122232425
262728293031  

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 23 other followers

%d bloggers like this: