@ -123,7 +123,8 @@
"zendframework/zend-config": "~3.0",
"zendframework/zend-feed": "~2.6|^3.0",
"zendframework/zend-http": "~2.6|^3.0",
"zendframework/zend-soap": "~2.6|^3.0"
"zendframework/zend-soap": "~2.6|^3.0",
"stripe/stripe-php": "*"
},
"require-dev": {
"behat/behat": "~3.5",
@ -412,7 +412,6 @@ switch ($sale['payment_type']) {
$stripeParams = $plugin->getStripeParams();
$currency = $plugin->getCurrency($sale['currency_id']);
require_once '../gateways/stripe-php/init.php';
\Stripe\Stripe::setApiKey($stripeParams['secret_key']);
\Stripe\Stripe::setAppInfo("ChamiloBuyCoursesPlugin");
@ -15,8 +15,6 @@ $payload = @file_get_contents('php://input');
$sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE'];
$event = null;
try {
$event = \Stripe\Webhook::constructEvent(
$payload, $sig_header, $stripeParams['endpoint_secret']