Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'w49_MDL-35456_m24_paypal' of git://github.com/skodak/mo…

…odle into MOODLE_24_STABLE
  • Loading branch information...
commit 8938f0848e54d82eb5be1e01f64f255317bcaed8 2 parents 0e73e16 + 324efa5
@danpoltawski danpoltawski authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 enrol/paypal/ipn.php
View
5 enrol/paypal/ipn.php
@@ -90,13 +90,14 @@
$plugin = enrol_get_plugin('paypal');
/// Open a connection back to PayPal to validate the data
+$paypaladdr = empty($CFG->usepaypalsandbox) ? 'www.paypal.com' : 'www.sandbox.paypal.com';
$c = new curl();
$options = array(
'returntransfer' => true,
- 'httpheader' => array('application/x-www-form-urlencoded'),
+ 'httpheader' => array('application/x-www-form-urlencoded', "Host: $paypaladdr"),
'timeout' => 30,
+ 'CURLOPT_HTTP_VERSION' => CURL_HTTP_VERSION_1_1,
);
-$paypaladdr = empty($CFG->usepaypalsandbox) ? 'www.paypal.com' : 'www.sandbox.paypal.com';
$location = "https://$paypaladdr/cgi-bin/webscr";
$result = $c->post($location, $req, $options);
Please sign in to comment.
Something went wrong with that request. Please try again.