REST API 400 Bad Request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, by today I receive payments from my game www.footballherogame.it, but users doesn't receive the money game they've bought.
I've tried to check my code
fputs($fp, $header . $req); while(!feof($fp)){ $res = fgets($fp, 1024); //if paypal said is VERIFIED if(strtoupper(trim($res)) == "VERIFIED"){ //do things }
I've looked that $res now it's not VERIFIED even if I receive the payment from the user, but I get
The requested URL "[no URL]", is invalid.<p>
HTTP/1.0 400 Bad Request
<TITLE>Invalid URL</TITLE>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a "me too" reply: getting exactly the same errors, starting some time about 4-6 days ago.
Will post of course when I find out the cause..
For completeness, I'm using this call and parameters:
$req = 'cmd=_notify-synch'; $tx_token = $_GET['tx']; $auth_token = "(my auth token)"; $req .= "&tx=$tx_token&at=$auth_token"; // post back to PayPal system to validate $header = "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, exactly same problem and code...but I use
$req = 'cmd=_notify-validate';
Could someone help us?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same problem till 12 sett 2018
I recive this erorr:
HTTP/1.0 400 Bad Request
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: text/html
Content-Length: 209
Expires: Thu, 13 Sep 2018 10:28:07 GMT
Date: Thu, 13 Sep 2018 10:28:07 GMT
Connection: close
Invalid URL
The requested URL "[no URL]", is invalid.
Reference #9.55b5655f.1536834487.1bd5c063
is it paypal server problem?
Please help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ilventodellest wrote:is it paypal server problem?
Please help!
It's either that, or there was some API change we missed.
I'm browsing the changelog now: https://developer.paypal.com/docs/release-notes/release-notes-2018/#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to update your scripts to HTTP 1.1
1. modify the posted Header information from
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
into
$header .= "POST /cgi-bin/webscr HTTP/1.1\r\n";
2. add the Host variable to the header that is typically missing in HTTP 1.0 requests!
so add a line like
$header .= "Host: www.paypal.com\r\n";
if your script communicates with www.paypal.com or
change it to the proper used endpoint host like ipnpb.paypal.com
good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you
That's so easily overlooked, thanks a lot.
The silly thing is, in a different part of the site there's also some "purchase code",
and it uses curl, which works fine.. (should've compared the two a bit better..)
(test it out by getting a subscription at https://www.calcudoku.org )
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- SetExpressCheckout 10003 error with ITEMCATEGORY=Digital in NVP/SOAP APIs
- Getting errors when integrating standard checkout with my web site. Probably a beginner problem. in SDKs
- IPN works in sandbox but not live in Sandbox Environment
- Receiving a PAYMENT.SALE.COMPLETED webhook notification - how can I trace the parent Subscription in REST APIs
- Recurring payment with credit card in REST APIs