我下載了.NET SDK的Payflow網關和隨後these instructions上設置我的Payflow網關測試帳戶,然後修改兩行DOSecureTokenAuth.cs,的用戶和連接變量:PayPal的Payflow網關SDK示例不工作
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網關文檔說我應該提交我SECURETOKENID和SECURETOKEN到http://payflowlink.paypal.com(即使你想使用Payflow PRO ???),這裏是我的嘗試(下面是一個GET一個例子,但POST失敗同樣的方式):
我更是以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
幫助!什麼導致模糊的錯誤?!
只是沒有人會感到困惑,「Sandbox」僅用於PayPal測試,這與Payflow測試不同。 Payflow測試你必須使用現場網站(manager.paypal。com),爲了創建一個「測試」帳戶,一旦獲取了財務信息,就會取消註冊過程。精美的設計! – inanutshellus 2012-02-07 14:35:22