Merge pull request #122 from Focuslinkstech/Development
We are excited to introduce a new feature
This commit is contained in:
commit
4e23918999
@ -267,18 +267,39 @@ switch ($action) {
|
|||||||
$ui->display('user-sendPlan.tpl');
|
$ui->display('user-sendPlan.tpl');
|
||||||
break;
|
break;
|
||||||
case 'buy':
|
case 'buy':
|
||||||
|
$ui->assign('_title', Lang::T('Select Payment Gateway'));
|
||||||
|
$ui->assign('_system_menu', 'package');
|
||||||
if (strpos($user['email'], '@') === false) {
|
if (strpos($user['email'], '@') === false) {
|
||||||
r2(U . 'accounts/profile', 'e', Lang::T("Please enter your email address"));
|
r2(U . 'accounts/profile', 'e', Lang::T("Please enter your email address"));
|
||||||
}
|
}
|
||||||
if ($config['payment_gateway'] == 'none') {
|
|
||||||
r2(U . 'home', 'e', Lang::T("No Payment Gateway Available"));
|
|
||||||
}
|
|
||||||
if (!file_exists($PAYMENTGATEWAY_PATH . DIRECTORY_SEPARATOR . $config['payment_gateway'] . '.php')) {
|
if (!file_exists($PAYMENTGATEWAY_PATH . DIRECTORY_SEPARATOR . $config['payment_gateway'] . '.php')) {
|
||||||
r2(U . 'home', 'e', Lang::T("No Payment Gateway Available"));
|
r2(U . 'home', 'e', Lang::T("No Payment Gateway Available"));
|
||||||
}
|
}
|
||||||
|
require_once $PAYMENTGATEWAY_PATH . DIRECTORY_SEPARATOR . $config['payment_gateway'] . '.php';
|
||||||
|
$files = scandir($PAYMENTGATEWAY_PATH);
|
||||||
|
foreach ($files as $file) {
|
||||||
|
if (pathinfo($file, PATHINFO_EXTENSION) == 'php') {
|
||||||
|
$pgs[] = str_replace('.php', '', $file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$ui->assign('pgs', $pgs);
|
||||||
|
$ui->assign('route2', $routes[2]);
|
||||||
|
$ui->assign('route3', $routes[3]);
|
||||||
|
|
||||||
|
//$ui->assign('plan', $plan);
|
||||||
|
$ui->display('user-selectGateway.tpl');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'pay_now':
|
||||||
|
$gateway = $_POST['gateway'];
|
||||||
|
//$routes[2] = $_GET['route2'];
|
||||||
|
//$routes[3] = $_GET['route3'];
|
||||||
|
if ($gateway == 'none') {
|
||||||
|
r2(U . 'order/buy/' . $routes[2] . '/' . $routes[3], 'e', Lang::T("No Payment Gateway Selected"));
|
||||||
|
}
|
||||||
run_hook('customer_buy_plan'); #HOOK
|
run_hook('customer_buy_plan'); #HOOK
|
||||||
include $PAYMENTGATEWAY_PATH . DIRECTORY_SEPARATOR . $config['payment_gateway'] . '.php';
|
include $PAYMENTGATEWAY_PATH . DIRECTORY_SEPARATOR . $gateway . '.php';
|
||||||
call_user_func($config['payment_gateway'] . '_validate_config');
|
call_user_func($gateway . '_validate_config');
|
||||||
|
|
||||||
if ($routes['2'] == 'radius') {
|
if ($routes['2'] == 'radius') {
|
||||||
$router['id'] = 0;
|
$router['id'] = 0;
|
||||||
|
@ -6,12 +6,11 @@
|
|||||||
<div class="panel-body row">
|
<div class="panel-body row">
|
||||||
{foreach $pgs as $pg}
|
{foreach $pgs as $pg}
|
||||||
<div class="col-sm-4 mb20">
|
<div class="col-sm-4 mb20">
|
||||||
<a href="{$_url}paymentgateway/{$pg}"
|
<a href="{$_url}paymentgateway/{$pg}" class="btn btn-block btn-default">{ucwords($pg)}</a>
|
||||||
class="btn btn-block btn-{if $pg==$_c['payment_gateway']}success{else}default{/if}">{ucwords($pg)}</a>
|
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-footer">
|
<!-- <div class="panel-footer">
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-md-2 control-label">Payment Gateway</label>
|
<label class="col-md-2 control-label">Payment Gateway</label>
|
||||||
@ -28,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{include file="sections/footer.tpl"}
|
||||||
{include file="sections/footer.tpl"}
|
|
30
ui/ui/user-selectGateway.tpl
Normal file
30
ui/ui/user-selectGateway.tpl
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{include file="sections/user-header.tpl"}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="panel panel-info panel-hovered">
|
||||||
|
<div class="panel-heading">{Lang::T('Available Payment Gateway')}</div>
|
||||||
|
<div class="panel-footer">
|
||||||
|
<form method="post" action="{$_url}order/pay_now/{$route2}/{$route3}">
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-md-2 control-label">Payment Gateway</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select name="gateway" id="gateway" class="form-control">
|
||||||
|
<option value="none" selected="selected">None</option>
|
||||||
|
{foreach $pgs as $pg}
|
||||||
|
<option value="{$pg}">
|
||||||
|
{ucwords($pg)}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<button type="submit" class="btn btn-block btn-primary">{Lang::T('Pay Now')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{include file="sections/user-footer.tpl"}
|
Loading…
x
Reference in New Issue
Block a user