paypal - 如何通过直接付款设置 PayPal 定期付款的结束日期?

标签 paypal paypal-sandbox paypal-subscriptions recurring-billing

我正在使用定期付款和直接付款( 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);

现在我的问题是结束日期尚未确定,所以如果有人有想法,请回复。 我想要用于设置结束日期的参数。

谢谢, 基兰·夏尔马。

最佳答案

我刚刚找到了答案,

其“TOTALBILLINGCYCLES”将设置要发生的周期数。

如上所述,我使用, $billingPeriod = urlencode("日");//周期为每天 $billingFreq = urlencode("1");//频率为 1。因此,每天都会收取费用

"&TOTALBILLINGCYCLES=15"//现在,当我使用此参数时,周期会发生 15 次,因此 15 天将收取 15 笔付款。

关于paypal - 如何通过直接付款设置 PayPal 定期付款的结束日期?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11516352/

相关文章:

paypal - 如何在Paypal沙箱中测试捕获付款并接受付款?

paypal - 如何创建带有账单地址的 PayPal 订阅表格?

Paypal IPN 退订

paypal - 从头到尾传递一个变量 - Paypal

paypal - 仅将帐户余额用于计费协议(protocol)?

java - 使用 java play 框架的 Integration Express Checkout 问题

php - paypal ipn 简单问题

php - 在 PHP 中使用 REST API 进行 Paypal 支付

paypal - 将 subscr_id 关联到我的 PayPal 帐户上的订阅

PayPal 订阅失败付款 Webhook 流程