Actualización
This commit is contained in:
30
plugin/buycourses/src/tpv_error.php
Normal file
30
plugin/buycourses/src/tpv_error.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Success page for the purchase of a course in the Buy Courses plugin.
|
||||
*
|
||||
* @package chamilo.plugin.buycourses
|
||||
*/
|
||||
require_once '../config.php';
|
||||
|
||||
$plugin = BuyCoursesPlugin::create();
|
||||
$tpvRedsysEnabled = $plugin->get('tpv_redsys_enable') === 'true';
|
||||
|
||||
if (!$tpvRedsysEnabled) {
|
||||
api_not_allowed(true);
|
||||
}
|
||||
|
||||
$sale = $plugin->getSale($_SESSION['bc_sale_id']);
|
||||
|
||||
if (empty($sale)) {
|
||||
api_not_allowed(true);
|
||||
}
|
||||
|
||||
Display::addFlash(
|
||||
Display::return_message($plugin->get_lang('ErrorContactPlatformAdmin'), 'error')
|
||||
);
|
||||
|
||||
unset($_SESSION['bc_sale_id']);
|
||||
header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/course_catalog.php');
|
||||
exit;
|
||||
Reference in New Issue
Block a user