如何设置贝宝经常性付款,可直接付款结束日期?(How to Set end date for pay

2019-09-19 14:36发布

我使用循环付款患者直接支付( https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPRecurringPayments#id08669F0705Z )

我设定的参数作为下方做工精细,

$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,基兰·夏尔马。

Answer 1:

我刚刚找到了答案,

“TOTALBILLINGCYCLES”,这将设定周期数来occure。

如上我使用,$ billingPeriod =用urlencode( “日”); //循环是每天$ billingFreq =用urlencode( “1”); //频率是1的话,支付colledt每一天

“&TOTALBILLINGCYCLES = 15” //现在,当我使用此参数的循环发生地15次,支付15天收集15。



文章来源: How to Set end date for paypal Recurring Payments With Direct Payment?