ARB subscription 扣款时如何调用ipn之类的文件。在授权.net?

How can call file like ipn in ARB subscription when deduct payment. in Authorized .net?

我在 Auth.net 中有很多订阅,所有订阅的有效期为 30 天,所有 运行 为 60 个月。

我有几个操作,例如电子邮件和更新我的数据库相关的以及数量更改类型的许多操作,我必须在进行任何订阅时执行。

目前我正在做 cron 工作,但是编写代码的过程非常漫长和复杂。

所以研究我发现 auth.net 像 Silent post url.

但我已经在我的沙盒帐户中尝试过,但它不起作用。我不确定当订阅从卡上扣除钱时这是否有效?

什么是无声的posturl有没有效果?

我正在post根据评论和研究做出回答。

IPN 和无声 post URL 是一回事。

  • Silent post URL 无法使用测试帐户,您需要使用实时帐户 需要帐户。
  • 沉默postURL扣款时总是叫。那不 不管付款是针对 ARB 还是简单。
  • 你只能输入一个无声的postURL他们是用那个url每次付款的 auth.net
  • 下一个凌晨 2 点左右 auth.net 付款扣除,这样您就可以 也使用 cron 作业。

沉默PostUrl如何测试

Testing Silent Post with Authorize.net

<form action="http://www.yourdomain.com/silent-post.php" method="post">
<input type="hidden" name="x_response_code" value="1"/>
<input type="hidden" name="x_response_subcode" value="1"/>
<input type="hidden" name="x_response_reason_code" value="1"/>
<input type="hidden" name="x_response_reason_text" value="This transaction has been approved."/>
<input type="hidden" name="x_auth_code" value=""/>
<input type="hidden" name="x_avs_code" value="P"/>
<input type="hidden" name="x_trans_id" value="1821199455"/>
<input type="hidden" name="x_invoice_num" value=""/>
<input type="hidden" name="x_description" value=""/>
<input type="hidden" name="x_amount" value="9.95"/>
<input type="hidden" name="x_method" value="CC"/>
<input type="hidden" name="x_type" value="auth_capture"/>
<input type="hidden" name="x_cust_id" value="1"/>
<input type="hidden" name="x_first_name" value="John"/>
<input type="hidden" name="x_last_name" value="Smith"/>
<input type="hidden" name="x_company" value=""/>
<input type="hidden" name="x_address" value=""/>
<input type="hidden" name="x_city" value=""/>
<input type="hidden" name="x_state" value=""/>
<input type="hidden" name="x_zip" value=""/>
<input type="hidden" name="x_country" value=""/>
<input type="hidden" name="x_phone" value=""/>
<input type="hidden" name="x_fax" value=""/>
<input type="hidden" name="x_email" value=""/>
<input type="hidden" name="x_ship_to_first_name" value=""/>
<input type="hidden" name="x_ship_to_last_name" value=""/>
<input type="hidden" name="x_ship_to_company" value=""/>
<input type="hidden" name="x_ship_to_address" value=""/>
<input type="hidden" name="x_ship_to_city" value=""/>
<input type="hidden" name="x_ship_to_state" value=""/>
<input type="hidden" name="x_ship_to_zip" value=""/>
<input type="hidden" name="x_ship_to_country" value=""/>
<input type="hidden" name="x_tax" value="0.0000"/>
<input type="hidden" name="x_duty" value="0.0000"/>
<input type="hidden" name="x_freight" value="0.0000"/>
<input type="hidden" name="x_tax_exempt" value="FALSE"/>
<input type="hidden" name="x_po_num" value=""/>
<input type="hidden" name="x_MD5_Hash" value="A375D35004547A91EE3B7AFA40B1E727"/>
<input type="hidden" name="x_cavv_response" value=""/>
<input type="hidden" name="x_test_request" value="false"/>
<input type="hidden" name="x_subscription_id" value="365314"/>
<input type="hidden" name="x_subscription_paynum" value="1"/>
<input type="submit"/>

这种 post 名称可以在您的 post 文件中获得。

测试说明:-

  • 在你的项目目录下做一个表格放在上面 代码。
  • 更改表单的操作 url 实际上是您的 Silent post Url 在那里存档,您以后需要为直播编写代码。
  • 在那里你可以打印你如何接收数据并得到post的名字 数据.

    echo "<pre>";
    print_r($_REQUEST);
    echo "</pre>";
    die();
    
  • 打印数组并查看测试数据。

希望这个回答能帮助理解 silent post url.

谢谢。