Also versuche ich die Paypal Express Checkout zu implementieren und halte den oben genannten Fehler.Paypal Express Checkout: Fehler 10001 Timeout
Meine NV ist wie folgt:
METHOD=SetExpressCheckout&
VERSION=204.0&
USER=mylogicn&
PWD=mypwd&
SIGNATURE=mysignature&
PAYMENTREQUEST_0_AMT=26.65&
PAYMENTREQUEST_0_CURRENCYCODE=GBP&
RETURNURL=https://www.example.com/Basket/NotificationProcessor.ashx?type=paypalsuccess&
CANCELURL=https://www.example.com/Basket/NotificationProcessor.ashx?type=paypalfailure&
PAYMENTREQUEST_0_PAYMENTACTION=Sale
Offensichtlich mit bestimmten Informationen geändert. Ich kann nichts besonders falsch mit der Anfrage finden, aber ohne Fehler immer 10001 zurück, mit Timeout Verarbeitung Anfrage.
Ich hoffe jemand hier ist schon einmal begegnet und hat eine Lösung.
EDIT: Hier ist der Code, der die Anforderung und ruft die Antwort schnürt:
string[][,] nv = new string[11][,]
{
new string[,]{{"METHOD", "SetExpressCheckout" }},
new string[,]{{"VERSION", "204.0" }},
new string[,]{{"USER", "myuser"}},
new string[,]{{"PWD", "mypwd"}},
new string[,]{{"SIGNATURE","mysig"}},
new string[,]{{"PAYMENTREQUEST_0_AMT", "26.65"}},
new string[,]{{"PAYMENTREQUEST_0_CURRENCYCODE","GBP"}},
new string[,]{{"RETURNURL", "https://www.example.com/Basket/NotificationProcessor.ashx?type=paypalsuccess"}},
new string[,]{{"CANCELURL", "https://www.example.com/Basket/NotificationProcessor.ashx?type=paypalfailure"}},
new string[,]{{"PAYMENTREQUEST_0_PAYMENTACTION", "Sale"}},
new string[,]{{"NOSHIPPING", "1"}},
};
string q = "?";
foreach(string[,] s in nv)
{
q += s[0,0] + "=" + s[0,1] + "&";
}
q = q.TrimEnd('&');
HttpWebRequest req = (HttpWebRequest)WebRequest.Create("https://api-3t.sandbox.paypal.com/nvp" + q);
req.Method = "POST";
HttpWebResponse response = (HttpWebResponse)req.GetResponse();
var encoding = ASCIIEncoding.ASCII;
if (response.StatusCode == HttpStatusCode.OK)
{
using (var reader = new System.IO.StreamReader(response.GetResponseStream(), encoding))
{
string response = reader.ReadToEnd();
}
}
Und paypals Antwort:
TIMESTAMP=2016%2d07%2d11T11%3a10%3a55Z&
CORRELATIONID=dcd0f848a9bb9&
ACK=Failure&
L_ERRORCODE0=10001&
L_SHORTMESSAGE0=Internal%20Error&
L_LONGMESSAGE0=Timeout%20processing%20request
Stellen Sie sicher, dass Sie die gesamte Antwort lesen? Es wäre hilfreich, wenn Sie Ihren Code hinzufügen (weniger gemeinsame Geheimnisse und Schlüssel natürlich. Zur Frage. –
Ich entschuldige mich. Ich habe meine Frage bearbeitet, um den Code, der die Anfrage und die Antwort erstellt, die ich erhalte. – user2078816