2017-02-10 1 views
0

私はPayPal .Net SDKを使用しています。私は「ライブ」のWebサーバー上でテストしてみましたまでそれがうまく働いていた、私はモードを設定する「セキュリティ・テスト・サンドボックス」PayPalモードを「security-test-sandbox」に設定した後、「リモートサーバーに接続できません」というエラーをどのようにデバッグできますか?

<paypal> 
    <settings> 
     <!-- Replace the mode to `security-test-sandbox` to test if your server supports TLSv1.2. For more information follow README instructions.--> 
     <add name="mode" value="security-test-sandbox" /> 

しかし、今C#で、コードの下の行...

// Returns APIContext object 
    public static APIContext GetApiContext() 
    { 
     // ### Api Context 
     // Pass in a `APIContext` object to authenticate 
     // the call and to send a unique request id 
     // (that ensures idempotency). The SDK generates 
     // a request id if you do not pass one explicitly. 

     var config = getConfig(); 

     var tokenCredential = new OAuthTokenCredential(clientId, clientSecret, config); 
     string accessToken = tokenCredential.GetAccessToken();// this errors 

...このエラーがスローされます。

PayPal.PayPalException: Retried 1 times.... Exception in PayPal.HttpConnection.Execute(). Check log for more details.

問題は、ログは単に「リモートサーバーに接続できません」、私に有用な情報を与えないということです。

2017-02-10 17:32:41,114 [10] DEBUG PayPal.Api.PayPalResource [(null)] Content-Type:application/x-www-form-urlencoded

2017-02-10 17:32:41,130 [10] DEBUG PayPal.Api.PayPalResource [(null)] User-Agent:PayPalSDK/PayPal-NET-SDK 1.8.0 (lang=DOTNET;v=4.5.1;clr=4.0.30319.42000;bit=64;os=Microsoft Windows NT 6.3.9600.0)

2017-02-10 17:32:41,130 [10] DEBUG PayPal.Api.PayPalResource [(null)] Authorization:Basic QVV...MT3A=

2017-02-10 17:32:41,130 [10] DEBUG PayPal.Api.PayPalResource [(null)] PayPal-Request-Id:9dc50c0e-e836-4a5d-a9c6-c6894c839c42

2017-02-10 17:32:42,594 [10] ERROR PayPal.Api.HttpConnection [(null)] Unable to connect to the remote server

2017-02-10 17:32:42,594 [10] DEBUG PayPal.Api.HttpConnection [(null)] There was a problem connecting to the server: ConnectFailure

...

私は、自己署名証明書とcloudflareを使用してWebサーバーにHTTPSを設定しました。

security details in google chrome's dev tools

セキュリティは、PayPalに接続するのに十分であるべきで、私はまだできませんよ。

IISのFailedReqLogFilesへのログ記録を有効にしましたが、失敗した要求のエントリがありますが、ログの「エラーと警告」セクションに「エラーまたは警告が見つかりませんでした」と表示されます。

どうしたらうまくいかないのですか?

答えて

0

'security-test-sandbox'モードはサポートされなくなりました(readme update)。

'live'または 'sandbox'に設定するモードは、期待通りに機能します。

関連する問題