NVPAPICaller class throws error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Guys,
Firstly when I integrate NVPAPICaller class for sandbox payment it works fine.But from last few days it is not working, It shows following error
You must write ContentLength bytes to the request stream before calling [Begin]GetResponse.
When I debug it NVPAPICaller class contains one method HttpCall() and it returns error .
At the time of read content
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
{
result = sr.ReadToEnd();
}
And at the time of write into stream
using (StreamWriter writer = new StreamWriter(objRequest.GetRequestStream()))
{
writer.Write(strPost);
}
from last few days it's not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I'm having exactly the same problem as ashwinin and am pretty sure we're not the only developers having this issue. In my case the code was working fine, I handed the site over to the client for review while making no changes to it while that was happening and while it worked for them during their initial tests it suddenly just stopped. So, without any changes to the code that could have caused it, I think we're left with a couple of options. Either there was an update to our hosting environments that caused the problem or something changed with PayPal's sandbox. We'd both greatly appreciate some guidance.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys.
Thanks for reaching out to us in regards to this. Sorry to hear that you have been experiencing difficulties on your accounts recently.
I would advise you to reach out to our Technical Support team directly so that they can assist you further with the difficulties that you have been experiencing on your accounts recently.
There are some different ways that you can reach out to our Technical Support Team. Firstly, if you have a Twitter account, you can reach them through the Twitter handle @PayPal_MTS or alternatively, you can contact them directly through the Technical Support website here https://www.paypal-techsupport.com/
Please let us know how it goes.
David.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apparently there was a security change with PayPal (or so I read in another forum). As such, it was advised to add the following (change is bold text) to the paypalfunctions.cs file. This is for ASP.NET 4.0. I read that 4.5 is different. This is the only change I made and once again I'm able to process payments.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Paypal Live Subscription not working, whereas working perfectly in sandbox in About Payments
- 59exception 'PayPal\Exception\PayPalConnectionException' with message 'failed setting cipher list' in About Payments
- Error: This recipient does not accept payments denominated in INR. Please help in Implementing PayPal
- Things don't appear to be working at the moment. Please try again later. in Ask an Expert
- Unable to use verified/linked CC to make eBay purchase. in About Payments