Very Importend for paypal / DT auto donation system users !!!!

  • 2 Replies
  • 2265 Views
*

diemthuy

Very Importend for paypal / DT auto donation system users !!!!
« on: January 04, 2013, 08:48:35 am »
Paypal will change there IPN system , it will only accept HTTP 1.1 headers from 1/2/2013

So people who use my auto donation system need to replace this part in paypal.php

Code: [Select]
// post back to PayPal system to validate

$header = "POST /cgi-bin/webscr HTTP/1.0\r\n";

// If testing on Sandbox use:
if ($settings["test"]=="true")
{
$header .= "Host: www.sandbox.paypal.com:80\r\n";
}
if ($settings["test"]=="false")
{
$header .= "Host: www.paypal.com:80\r\n";
}
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";

// If testing on Sandbox use:
if ($settings["test"]=="true")
{
$fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30);
$ppmail= $settings["sandbox_email"];
}
if ($settings["test"]=="false")
{
$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
$ppmail= $settings["paypal_email"];
}

to


Code: [Select]
// 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";

// If testing on Sandbox use:
if ($settings["test"]=="true")
{
$header .= "Host: www.sandbox.paypal.com\r\n";
}
if ($settings["test"]=="false")
{
$header .= "Host: www.paypal.com\r\n";
}
$header .= "Connection: close\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";

// If testing on Sandbox use:
if ($settings["test"]=="true")
{
$fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
if (!$fp)
  {
    $fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30);
  }
$ppmail= $settings["sandbox_email"];
}
if ($settings["test"]=="false")
{
$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);
if (!$fp)
  {
    $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
  }
$ppmail= $settings["paypal_email"];
}

in paypalsynch.php

replace

Code: [Select]
// 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";

to

Code: [Select]
// 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 .= "Connection: close\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";


« Last Edit: January 04, 2013, 09:01:42 am by diemthuy »

*

diemthuy

Re: Very Importend for paypal / DT auto donation system users !!!!
« Reply #1 on: February 01, 2014, 12:05:29 am »
Paypal did change something again around 25 jan 2014  , are there people facing a ipn problem the last few days ?

I noticed and fixed the problem in the SMF treasury donation system , but I gues the problem must be in my XBTIT system to , but I want to know for sure before I post the fix

*

Offline Srisragate

  • **
  • 1
  • +0/-0
Re: Very Importend for paypal / DT auto donation system users !!!!
« Reply #2 on: June 12, 2018, 09:09:30 am »
I'm looking for this information to fit it.

 


Powered by EzPortal