PayPal IPN update

  • Posts: 241
  • Thank you received: 5
11 years 2 months ago #123067

Hi,

I just got a notice from PayPal (copied and pasted below). I just want to confirm that HikaShop is aware of this and has made the requisite specification changes... thanks.

COPY AND PASTE STARTS HERE>

Starting October 7, 2013, we will require all incoming requests to have a “Host” header which complies with HTTP 1.1 Specifications. This header was not required under HTTP 1.0. IPN and PDT scripts using HTTP 1.0 may start failing with “HTTP/1.0 400 Bad Request” errors after October 7, 2013, which will result in IPN messages not being validated successfully, or PDT scripts not being able to retrieve transaction information.

Action Required before October 7, 2013

Merchants need to update their IPN and/or PDT scripts to use HTTP 1.1, and include the “Host” and “Connection: close” HTTP header in the IPN postback script.

Example with Host as www.paypal.com (please make necessary changes if you are using ipnpb.paypal.com):

ASP
//Set values for the request back
req.Method="POST";
req.Host="' www.paypal.com '";
req.ContentType="application/x-www-form-urlencoded";

Perl
$req=HTTP::Request->new('POST', ' www.paypal.com/cgi-bin/webscr ');
$req->content_type('application/x-www-form-urlencoded');
$req->header(Host=> ' www.paypal.com ');
$req->header(Connection=> 'close');
PHP
// post back to PayPal system to validate
$header="POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .="Content-Type: application/x-www-form-urlencoded\r\n";
$header .="Host: www.paypal.com\r\n";
$header .="Connection: close\r\n\r\n";

Java
HttpsURLConnection uc=(HttpsURLConnection) u.openConnection();
uc.setDoOutput(true);
uc.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
uc.setRequestProperty("Host", " www.paypal.com ");
uc.setRequestProperty("Connection", "Close");

The PayPal Sandbox has been configured to reject any HTTP requests without the “Host” header with HTTP 400 error. Merchants can use the Sandbox environment to certify the changes to their IPN and PDT scripts.

For more information on PDT and IPN, please refer to www.paypal.com/pdt and www.paypal.com/ipn . For additional information or questions about this change, please contact PayPal's Merchant Technical Support team via www.paypal.com/mts .

Sincerely,

PayPal

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #123075

Hi,

The Paypal plugin in HikaShop 2.2.1 is right compatible.
We introduce the latest modifications in HikaShop 2.2.0

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum