paypal express checkout - 定期结算 - 检查重复出现的状态

时间:2014-10-19 08:40:43

标签: paypal recurring-billing payum

我正确设置了我的网站,以使用payum bundle的paypal定期结算来支持帐户年度订阅付款。

这些是我的网站在准备时发送给paypal的参数

    $agreementDetails['PAYMENTREQUEST_0_AMT'] = $this->view['user']->money;
    $agreementDetails['PAYMENTREQUEST_0_CURRENCYCODE'] = 'EUR';
    $agreementDetails['PAYMENTREQUEST_0_ITEMAMT'] = $this->view['user']->money;
    $agreementDetails['PAYMENTREQUEST_0_PAYMENTACTION'] = "sale";
    $agreementDetails['L_PAYMENTREQUEST_0_NAME0'] = "Annual subscription";
    $agreementDetails['L_PAYMENTREQUEST_0_QTY0'] = 1;
    $agreementDetails['L_PAYMENTREQUEST_0_AMT0'] = $this->view['user']->money;
    $agreementDetails['NOSHIPPING'] = Api::NOSHIPPING_NOT_DISPLAY_ADDRESS;
    $agreementDetails['L_BILLINGTYPE0'] = Api::BILLINGTYPE_RECURRING_PAYMENTS;
    $agreementDetails['L_BILLINGAGREEMENTDESCRIPTION0'] = 'Annual account subscription';

以及经常性请求中的这些

    $recurringPaymentDetails['TOKEN'] = $agreementDetails['TOKEN'];
    $recurringPaymentDetails['DESC'] = 'annual account subscription';
    $recurringPaymentDetails['EMAIL'] = $agreementDetails['EMAIL'];
    $recurringPaymentDetails['AMT'] = $this->view['user']->money;
    $recurringPaymentDetails['CURRENCYCODE'] = 'EUR';
    $recurringPaymentDetails['BILLINGFREQUENCY'] = 365;
    $recurringPaymentDetails['PROFILESTARTDATE'] = date(DATE_ATOM);
    $recurringPaymentDetails['BILLINGPERIOD'] = Api::BILLINGPERIOD_DAY;

一切正常。

我的问题是,我只是想知道我的客户的定期付款是否会被接受和支付。而且,如果我的客户没有支付他的年费。

我的意思是,如何知道(服务器端,php)特定帐户的最后一次成功付款日期?

1 个答案:

答案 0 :(得分:1)

您需要配置IPN solution。 PayPal会将数据POST到您在事务发生时设置的侦听器脚本。您可以根据付款,退款,新配置文件,暂停配置文件,争议等更新数据库,发送自定义电子邮件通知,点击第三方Web服务或其他任何您想要自动化的内容。

您还可以使用TransactionSearch API并传入ProfileID以获取与该个人资料相关联的交易。