Low Paypal NVP API

I am trying to link my application with a PayPal account using the NVP API. Everything is working fine, but I find the paypal response time is slow, almost unusable.

If I request the latest transaction 100 using the TransactionSearch method, paypal takes 15 to 20 seconds to give an answer.

The answer costs only 25 KB, so I don’t think it is a question of the amount of data.

Maybe I'm doing something wrong?

This is my code:

Dim param As New Specialized.NameValueCollection param.Add("STARTDATE", "2017-01-1 0:0:0") Dim response As String = getNVP("TransactionSearch", param) Private Function getNVP(ByVal method As String, Optional ByVal param As Specialized.NameValueCollection = Nothing) As String If param Is Nothing Then param = New Specialized.NameValueCollection Using client As New Net.WebClient param.Add("METHOD", method) param.Add("USER", APIuser) param.Add("PWD", APIpass) param.Add("SIGNATURE", APIsign) param.Add("VERSION", "204") Dim rbytes = client.UploadValues("https://api-3t.paypal.com/nvp", "POST", param) Return Uri.UnescapeDataString((New System.Text.UTF8Encoding).GetString(rbytes)) End Using End Function 
+6
source share

Source: https://habr.com/ru/post/1015098/


All Articles