【问题标题】:PayPal's Payflow Gateway SDK Example not workingPayPal 的 Payflow Gateway SDK 示例不起作用
【发布时间】:2012-02-28 13:55:54
【问题描述】:

我为 Payflow Gateway 下载了 .NET SDK,并按照 these instructions 设置我的 Payflow Gateway 测试帐户,然后修改了两行 DOSecureTokenAuth.cs,即用户和连接变量:

        UserInfo User = new UserInfo("myacctname", "myacctname", 
                                     "PayPal", "passwd");
        PayflowConnectionData Connection = new PayflowConnectionData(
                                     "pilot-payflowpro.paypal.com", 443);

当我运行 DOSecureTokenAuth.cs 时,会打开一个命令行窗口:

------------------------------------------------------
Executing Sample from File: DOSecureTokenAuth.cs
------------------------------------------------------
RESULT = 0
RESPMSG = Approved
SECURETOKEN = 3BZVLoht6cESPxMkScSau4g4l
SECURETOKENID = 9e09209a562b43739dd5d1a44a3e2d73
DUPLICATE =
Transaction was successful.

The next step would be to redirect to PayPal to display the hosted
checkout page to allow your customer to select and enter payment.

This is only a simple example, which does not take into account things like
RETURN or SILENT POST URL, etc.

Press <Enter> to redirect to PayPal.

Transaction Successful.
Press Enter to Exit ...

显然成功了。耶。但是,下一步,将用户定向到 PayPal 的托管结帐页面总是会失败,并出现以下错误:

Some required information is missing or incorrect. Please correct the fields below and try again.
Error: An error has occurred. Please contact the system administrator.

Payflow Gateway 文档说我应该将我的 SECURETOKENID 和 SECURETOKEN 提交给 http://payflowlink.paypal.com(即使您想使用 Payflow PRO???),这是我尝试的一个示例(下面是一个 GET 但 POST 失败同样的方式):

https://payflowlink.paypal.com/?securetoken=3BZVLoht6cESPxMkScSau4g4l&securetokenid=9e09209a562b43739dd5d1a44a3e2d73&MODE=test&USER1=testuser1&ACCT=5105105105105100&EXPDATE=1212&CVV2=123

我什至根据上面链接的 PHP 示例制作了一个可爱的小 HTML 表单页面:

<form method='post' action='https://payflowlink.paypal.com/'>
<input type='text' name='SECURETOKEN' value='3BZVLoht6cESPxMkScSau4g4l' />
<input type='text' name='SECURETOKENID' value='9e09209a562b43739dd5d1a44a3e2d73' />
<input type='hidden' name='MODE' value='test' />
<input type='submit' />
</form>

正如预期的那样,它死于同样的模糊错误,这意味着我以某种不正确的方式配置了我的帐户。我没有提供真实的财务信息,因为这个帐户只是一个开发者测试帐户,不打算在实际网站上使用,但如果我正确阅读了文档,这是预期的方式。

由于我假设它是配置,因此我的帐户配置了以下设置:

PayPal Express Checkout = Enabled
PayPal Email Address and PayPal Sandbox Email Address are configured and going to the same address
Show Confirmation Page = On a PayPal hosted page
Use Silent Post = No
Send email = Yes
AVS Check = No
CVC Check = No
Enable Secure Token = Yes

帮助!是什么导致了这个模糊的错误?!

【问题讨论】:

    标签: payment-gateway paypal


    【解决方案1】:

    事实证明,示例 cs 文件将初始安全令牌请求作为“静默”发送,默认情况下未启用“静默”模式。注释掉该行(或启用静音模式)解决了这个问题。

    【讨论】:

      【解决方案2】:

      几年前经历过类似的磨难,我建议您尝试通过Paypal Developer Network 寻求帮助。

      当我针对他们的测试 API 进行开发时,我没有成功。事实证明,我访问的测试 URI 是一个旧的、过时的版本,它仍然列在我正在使用的当前文档中。

      获得这方面信息的唯一方法是从实际支持测试支付网关的人那里获得信息。这些人经常光顾我链接的 Paypal 开发者论坛。

      祝你好运!

      【讨论】:

        【解决方案3】:

        您配置的 Sandbox 帐户是实际工作的 Sandbox 帐户吗?
        如果不是这样,则可能是另一个帐户设置。通过https://www.papyal.com/mts 联系 PayPal 支持,他们应该能够为您解决问题。

        【讨论】:

        • 为了避免其他人感到困惑,“沙盒”仅用于 PayPal 测试,与 Payflow 测试不同。您必须使用实时网站 (manager.paypal.com) 进行支付流测试,并且为了创建“测试”帐户,一旦获得财务信息,您就取消注册过程。绝妙的设计!
        猜你喜欢
        • 2014-06-16
        • 1970-01-01
        • 2016-06-17
        • 1970-01-01
        • 2017-03-19
        • 2016-07-04
        • 2017-12-06
        • 2015-11-18
        • 2013-10-13
        相关资源
        最近更新 更多