gpt4 book ai didi

payment-gateway - PayPal 的 Payflow Gateway SDK 示例不起作用

转载 作者:太空宇宙 更新时间:2023-11-03 15:57:01 27 4
gpt4 key购买 nike

我下载了 .NET SDK对于 Payflow Gateway 并遵循 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

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

最佳答案

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

关于payment-gateway - PayPal 的 Payflow Gateway SDK 示例不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9171166/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com