';
$before_gateways .= '' . __('Manage Payment Gateways', 'event_espresso') . '
';
$before_gateways .= '';
$output .= '';
$output .= '
' . __('By-passing the Confirmation Page', 'event_espresso') . '
';
$output .= '
' . __('This will allow you to send your customers directly to the payment gateway of your choice.', 'event_espresso') . '
';
$output .= '';
return $output;
}
//This is the payment gateway settings page.
function event_espresso_gateways_options() {
global $wpdb;
echo before_gateways();
$gateways = array();
$gateways[] = 'check';
$gateways[] = 'bank';
$gateways[] = 'invoice';
$gateways[] = 'authnet';
$gateways[] = 'aim';
$gateways[] = 'firstdata';
$gateways[] = 'ideal';
$gateways[] = 'paypal';
$gateways[] = 'paypal_pro';
$gateways[] = 'eway';
$gateways[] = 'mwarrior';
$gateways[] = '2checkout';
$gateways[] = 'paytrace';
foreach ($gateways as $gateway) {
$func = 'event_espresso_' . $gateway . '_payment_settings';
$fallback_func = 'event_espresso_' . $gateway . '_settings';
$fallback_func2 = 'event_espresso_' . $gateway . '_deposit_settings';
$fallback_func3 = 'event_espresso_authnet_' . $gateway . '_settings';
if (file_exists(EVENT_ESPRESSO_GATEWAY_DIR . "/" . $gateway . "/settings.php")) {
require_once(EVENT_ESPRESSO_GATEWAY_DIR . "/" . $gateway . "/settings.php");
if(function_exists($func)) $func();
elseif(function_exists($fallback_func)) $fallback_func();
elseif(function_exists($fallback_func2)) $fallback_func2();
elseif(function_exists($fallback_func3)) $fallback_func3();
} elseif
(file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . "gateways/" . $gateway . "/settings.php")) {
require_once(EVENT_ESPRESSO_PLUGINFULLPATH . "gateways/" . $gateway . "/settings.php");
if(function_exists($func)) $func();
elseif(function_exists($fallback_func)) $fallback_func();
elseif(function_exists($fallback_func2)) $fallback_func2();
elseif(function_exists($fallback_func3)) $fallback_func3();
}
}
//requires and empty alipay_active.php file in the gateways/alipay OR
//if you have moved the gateway files, place it in uploads/espresso/gateways
if (file_exists(EVENT_ESPRESSO_GATEWAY_DIR . "/alipay/alipay_active.php") || file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . "gateways/alipay/alipay_active.php")) {
if (file_exists(EVENT_ESPRESSO_GATEWAY_DIR . "/alipay/settings.php")) {
require_once(EVENT_ESPRESSO_GATEWAY_DIR . "/alipay/settings.php");
event_espresso_alipay_settings();
} elseif (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . "gateways/alipay/settings.php")) {
require_once(EVENT_ESPRESSO_PLUGINFULLPATH . "gateways/alipay/settings.php");
event_espresso_alipay_settings();
}
}
if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH.'includes/admin-files/gateway_developer.php')){
require_once(EVENT_ESPRESSO_PLUGINFULLPATH.'includes/admin-files/gateway_developer.php');
}
echo after_gateways();
}