How to Set end date for paypal Recurring Payments With Direct Payment?
Asked Answered
G

1

2

I am using Recurring Payments With Direct Payment( https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPRecurringPayments#id08669F0705Z )

I set parameter as below and WORKING FINE,

$firstName = urlencode('MyName');//urlencode('customer_first_name');
$lastName = urlencode('MySurname');//urlencode('customer_last_name');
$creditCardType = urlencode('VISA');//urlencode('customer_credit_card_type');
$creditCardNumber = urlencode('455743552XXXXXXXX');//urlencode('customer_credit_card_number');
$expDateMonth = '07';//'cc_expiration_month';
$expDateYear = urlencode('2017');//urlencode('cc_expiration_year');
$padDateMonth = urlencode(str_pad($expDateMonth, 2, '0', STR_PAD_LEFT));
$amount =  urlencode('5');// urlencode('example_payment_amuont');
$startDate = urlencode("2012-07-17T0:0:0");
$endDate = urlencode("2012-07-21T0:0:0");

$billingPeriod = urlencode("Day");              // or "Day", "Week", "SemiMonth", "Year"
$billingFreq = urlencode("1");                      // combination of this and billingPeriod must be at most a year
$currencyID = urlencode("USD"); 

$nvpStr = "&CREDITCARDTYPE=$creditCardType".
          "&ACCT=$creditCardNumber".
          "&EXPDATE=$padDateMonth$expDateYear".
          "&FIRSTNAME=MyFirstName".
          "&LASTNAME=MyLastName".
          "&PROFILESTARTDATE=$startDate".
          "&PROFILEENDDATE=$endDate".     // **not working**
          "&BILLINGPERIOD=$billingPeriod".
          "&BILLINGFREQUENCY=$billingFreq".
          "&AMT=$amount&DESC=Test Recurring Payment";

$httpParsedResponseAr = PPHttpPost('CreateRecurringPaymentsProfile', $nvpStr);

Now my issue is end date not set, so please reply if anybody had idea. I want parameter for setting end date.

Thankx, Kiran Sharma.

Gopak answered 17/7, 2012 at 5:12 Comment(0)
G
2

I just found the answer,

its "TOTALBILLINGCYCLES" which will set the number of cycles to occure.

as above i use, $billingPeriod = urlencode("Day"); // the cycle is per day $billingFreq = urlencode("1"); // freq is 1. so, payment colledt every day

"&TOTALBILLINGCYCLES=15" // now when i use this parameter the cycle takes place 15 times so payment collect 15 for 15 days.

Gopak answered 3/9, 2012 at 10:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.