mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'w49_MDL-35456_m25_paypal' of git://github.com/skodak/moodle
This commit is contained in:
commit
9c714c83b7
@ -90,13 +90,14 @@ if (! $plugin_instance = $DB->get_record("enrol", array("id"=>$data->instanceid,
|
||||
$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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user