如何实现paypal CreateRecurringPaymentsProfile

时间:2012-02-28 10:16:45

标签: php paypal

在我的网站中,我们需要整合paypal Recurring(CreateRecurringPaymentsProfile) 但我们最终不想拿信用卡详细信息,我们需要将用户重定向到paypal网站,他们将使用paypal门户网站填写信用卡信息,然后创建CreateRecurringPaymentsProfile ... 我该如何实现呢?

1 个答案:

答案 0 :(得分:2)

要开始使用定期付款,PayPal会获取所有信用卡详细信息,您可以使用快速结账定期付款。

要使用此功能,请使用(至少)以下参数调用以下API调用:

SetExpressCheckout

$nvps = array();
$nvps["VERSION"] = "80.0";

$nvps["METHOD"] = "SetExpressCheckout";

$nvps["PAYMENTREQUEST_0_PAYMENTACTION"] = "Sale";
$nvps["PAYMENTREQUEST_0_AMT"] = "1.00";
$nvps["PAYMENTREQUEST_0_CURRENCYCODE"] = "GBP";
$nvps["PAYMENTREQUEST_0_ITEMAMT"] = "1.00";

$nvps["L_BILLINGTYPE0"] = 'RecurringPayments';
$nvps["L_BILLINGAGREEMENTDESCRIPTION0"] = "the subscription";

$nvps["L_PAYMENTREQUEST_0_NUMBER0"] = 1;
$nvps["L_PAYMENTREQUEST_0_NAME0"]= "subscription";
$nvps["L_PAYMENTREQUEST_0_AMT0"]= 1.00;
$nvps["L_PAYMENTREQUEST_0_QTY0"]= 1;

CreateRecurringPaymentsProfile

$nvps["PROFILESTARTDATE"] = "2011-07-08T17:40:00Z";
$nvps["BILLINGPERIOD"] = "Month";
$nvps["BILLINGFREQUENCY"] = "1";
$nvps["AMT"] = "1.00";
$nvps["CURRENCYCODE"] = "GBP";
$nvps["DESC"] = "the subscription";