我正在使用直接支付的经常性付款(https://cms.paypal.com/us/cgi-bin/?cmd=_render-内容&content_ID=开发者/e_howto_api_WPRecurringPayments#id08669F0705Z)
我将参数设置为以下和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);
现在我的问题是结束日期还没有确定,所以如果有人有想法,请回复。我想要设置结束日期的参数
Thankx,基兰·夏尔马。
我刚刚找到了答案,
其"TOTALBILLINGCYCLES"将设置要发生的循环数。
如上所述,$billingPeriod=urlencode("天");//周期为每天$billingFreq=urlencode("1");//freq为1。因此,每天收取
"&TOTALBILLINGCYCLES=15"//现在,当我使用此参数时,周期会发生15次,因此付款将在15天内收取15次