简体   繁体   English

在php中订阅后如何获取PayPal定期付款数据?

[英]How to grab PayPal recurring payment data after subscription in php?

My PayPal subscription form is working fine.我的 PayPal 订阅表格工作正常。 But, I am not getting payment details in success page.但是,我没有在成功页面中获得付款详细信息。

index.php file: index.php 文件:

<form name="myform" action="<?php echo $paypal_url;?>" method="post">
<input type="hidden" name="business" value="<?php echo $merchant_email;?>" />
<input type="hidden" name="notify_url" value="<?php echo $notify_url;?>" />
<input type="hidden" name="cancel_return" value="<?php echo $cancel_return;?>" />
<input type="hidden" name="return" value="<?php echo $success_return;?>" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="lc" value="" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="CAD" />
<input type="hidden" name="page_style" value="paypal" />
<input type="hidden" name="charset" value="utf-8" />
<input type="hidden" name="item_name" value="Test Item" />
<input type="hidden" value="_xclick-subscriptions" name="cmd"/>
<input type="hidden" name="amount" value="20" />

Success.php file:成功.php文件:

print_r($_REQUEST);

I am not getting data in success page.我没有在成功页面中获取数据。

What you are showing here is a PayPal Standard subscription button.您在此处显示的是 PayPal 标准订阅按钮。 To process payments related to these, you should use IPN .要处理与这些相关的付款,您应该使用IPN

Once you get your IPN listener configured in general, you can build triggers specific to subscription actions using the following IPN transaction types :总体配置 IPN 侦听器后,您可以使用以下IPN 事务类型构建特定于订阅操作的触发器:

  • subscr_cancel订阅取消
  • subscr_eot subscr_eot
  • subscr_failed订阅失败
  • subscr_modify订阅修改
  • subscr_payment订阅付款
  • subscr_signup订阅者注册

When those things occur on your PayPal account it will trigger the related IPN accordingly, and your listener can receive the data associated with that transaction and process it however you need.当这些事情发生在您的 PayPal 帐户上时,它会相应地触发相关的 IPN,您的侦听器可以接收与该交易相关的数据并根据需要对其进行处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM