paypal - 为什么即使值是正确的,PayPal 也会显示无效的常规周期?

标签 paypal forms paypal-subscriptions

我正在提交以下表格,但 PayPal 总是给出一条错误消息:

Invalid Regular period. You must specify valid values for the A3, P3, and T3 parameters for a subscription.

问题:我的 html 表单有什么问题,其中 A3、P3 和 T3 具有有效值?

用于订阅付款的 PayPal Html 表单

   <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">

    <input type="hidden" name="business" value="someValidValue">
    <input type="hidden" name="cmd" value="_xclick-subscriptions">
    <input type="hidden" name="return" value="http://www.xyz/pc.aspx" />
    <input type="hidden" name="custom" value="23V125,new,architect" />
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="A3"  value="200" />
    <input type="hidden" name="T3"  value="M" />
    <input type="hidden" name="P3"  value="1" />
    <input type="hidden" name="item_name"  value="Gold" />
    <input type="hidden" name="max_text" value="Commit up to 50 loads per month and unlimited viewing/searching" />
    <input type="hidden" name="src" value="1"> <!-- recurring=yes -->
    <input type="hidden" name="sra" value="1"> <!-- reattempt=yes -->
    <div style="display:inline-block;margin-top:50px;">
        <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
        <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </div>
</form>

最佳答案

我需要以小写形式指定 A3T3P3。这解决了我的问题。

此外,始终确保 a3 的值不超过 2 位小数; a3 的值没有小数位就可以了。因此,值 200、200.34 或 200.1 会起作用,但 200.0000 或 200.345 不起作用。

我在 https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/ 的 PayPal 文档中发现了一个关于这个问题的有用事实。

IPN and PDT variable names are case-sensitive. All constant values are lowercase, except those for payment_status, whose constant values have an initial capital letter.

关于paypal - 为什么即使值是正确的,PayPal 也会显示无效的常规周期?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37370012/

相关文章:

PayPal 计费协议(protocol) - 创建后无approval_url 或redirect_url

javascript - PayPal Express Checkout.js - Checkout.js 中未定义的 indexOf

paypal - 获取与 Paypal 中的定期付款配置文件关联的交易

PayPal NVP 部分退款全额退款

php - Paypal 智能订阅服务器端

c# - 防止在窗体标题栏上单击鼠标右键显示系统上下文菜单

javascript - 在 Javascript 中使用 document.writeln 和输入表单

javascript - 拒绝确认对话框时重定向

paypal - 测试 Paypal 订阅 IPN

Paypal - 'subscription profiles not supported'