|
|
|
|
@ -35,6 +35,8 @@ $includeServices = $plugin->get('include_services'); |
|
|
|
|
$paypalEnabled = $plugin->get('paypal_enable') === 'true'; |
|
|
|
|
$transferEnabled = $plugin->get('transfer_enable') === 'true'; |
|
|
|
|
$culqiEnabled = $plugin->get('culqi_enable') === 'true'; |
|
|
|
|
$tpvRedsysEnable = $plugin->get('tpv_redsys_enable') === 'true'; |
|
|
|
|
$stripeEnable = $plugin->get('stripe_enable') === 'true'; |
|
|
|
|
$additionalQueryString = ''; |
|
|
|
|
if ($includeServices !== 'true') { |
|
|
|
|
api_not_allowed(true); |
|
|
|
|
@ -68,7 +70,13 @@ if (!$transferEnabled) { |
|
|
|
|
if (!$culqiEnabled) { |
|
|
|
|
unset($paymentTypesOptions[BuyCoursesPlugin::PAYMENT_TYPE_CULQI]); |
|
|
|
|
} |
|
|
|
|
if (!$tpvRedsysEnable || !file_exists(api_get_path(SYS_PLUGIN_PATH).'buycourses/resources/apiRedsys.php')) { |
|
|
|
|
unset($paymentTypesOptions[BuyCoursesPlugin::PAYMENT_TYPE_TPV_REDSYS]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!$stripeEnable) { |
|
|
|
|
unset($paymentTypesOptions[BuyCoursesPlugin::PAYMENT_TYPE_STRIPE]); |
|
|
|
|
} |
|
|
|
|
$form->addHtml( |
|
|
|
|
Display::return_message( |
|
|
|
|
$plugin->get_lang('PleaseSelectThePaymentMethodBeforeConfirmYourOrder'), |
|
|
|
|
|