fix critical bug customer can recharge without balance when using balance. and move Balance to select Gateway

This commit is contained in:
iBNu Maksum 2024-11-04 15:10:58 +07:00
parent 32a64d944a
commit 6db2f2bf0d
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
10 changed files with 266 additions and 317 deletions

View File

@ -19,6 +19,9 @@ class App{
}
public static function getTokenValue($key){
if(empty($key)){
return "";
}
if(isset($_SESSION[$key])){
return $_SESSION[$key];
}else{

View File

@ -30,13 +30,9 @@ class Balance
public static function min($id_customer, $amount)
{
$c = ORM::for_table('tbl_customers')->where('id', $id_customer)->find_one();
if ($c && $c['balance'] >= $amount) {
$c->balance = $c['balance'] - $amount;
$c->save();
return true;
} else {
return false;
}
}
public static function plusByPhone($phone_customer, $amount)

View File

@ -188,6 +188,20 @@ class Message
} else {
$msg = str_replace('[[expired_date]]', "", $msg);
}
if(strpos($msg, '[[payment_link]]')!== false){
// token only valid for 1 day, for security reason
$token = User::generateToken($customer['id'], 1);
$tur = ORM::for_table('tbl_user_recharges')
->where('customer_id', $customer['id'])
->where('namebp', $package)
->find_one();
if($tur){
$url = APP_URL . '?_route=home&recharge='. $tur.'uid='. $token;
$msg = str_replace('[[payment_link]]', $url, $msg);
}
}
if (
!empty($customer['phonenumber']) && strlen($customer['phonenumber']) > 5
&& !empty($message) && in_array($via, ['sms', 'wa'])

View File

@ -163,7 +163,8 @@ class User
if($validDays>=30){
$time = time();
}else{
$time = strtotime("+ $validDays days");
// for customer, deafult expired is 30 days
$time = strtotime('+ '.(30 - $validDays).' days');
}
return [

View File

@ -79,9 +79,10 @@ $handler = $routes[0];
if ($handler == '') {
$handler = 'default';
}
try {
if(!empty($_GET['uid'])){
$_COOKIE['uid'] = $_GET['token'];
$_COOKIE['uid'] = $_GET['uid'];
}
$admin = Admin::_info();
$sys_render = $root_path . File::pathFixer('system/controllers/' . $handler . '.php');

View File

@ -143,19 +143,7 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
$routers = ORM::for_table('tbl_routers')->where('name', $bill['routers'])->find_one();
$router = $routers['id'];
}
if ($config['enable_balance'] == 'yes') {
$plan = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
if (!$plan['enabled']) {
r2(U . "home", 'e', 'Plan is not exists');
}
if ($user['balance'] > $plan['price']) {
r2(U . "order/pay/$router/$bill[plan_id]&stoken=" . _get('stoken'), 'e', 'Order Plan');
} else {
r2(U . "order/buy/$router/$bill[plan_id]", 'e', 'Order Plan');
}
} else {
r2(U . "order/buy/$router/$bill[plan_id]", 'e', 'Order Plan');
}
r2(U. "order/gateway/$router/$bill[plan_id]");
}
} else if (!empty(_get('extend'))) {
if ($user['status'] != 'Active') {

View File

@ -205,15 +205,13 @@ switch ($action) {
if ($user['status'] != 'Active') {
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
}
$plan = ORM::for_table('tbl_plans')->where('enabled', '1')->find_one($routes['3']);
if (empty($plan)) {
$plan = ORM::for_table('tbl_plans')->find_one($routes[3]);
if (!$plan) {
r2(U . "order/package", 'e', Lang::T("Plan Not found"));
}
if (!$plan['enabled']) {
r2(U . "home", 'e', 'Plan is not exists');
}
if ($plan['is_radius'] == '1') {
$router_name = 'radius';
$router = 'radius';
} else {
$router_name = $plan['routers'];
}
@ -237,21 +235,21 @@ switch ($action) {
$tax = 0;
}
// Tax calculation stop
if ($plan && $plan['enabled'] && $user['balance'] >= $plan['price'] + $tax) {
$total_cost = $plan['price'] + $add_cost + $tax;
if ($plan && $plan['enabled'] && $user['balance'] >= $total_cost) {
if (Package::rechargeUser($user['id'], $router_name, $plan['id'], 'Customer', 'Balance')) {
// if success, then get the balance
Balance::min($user['id'], $plan['price'] + $add_cost + $tax);
Balance::min($user['id'], $total_cost);
App::setToken($_GET['stoken'], "success");
r2(U . "voucher/invoice/", 's', Lang::T("Success to buy package"));
} else {
r2(U . "order/package", 'e', Lang::T("Failed to buy package"));
Message::sendTelegram("Buy Package with Balance Failed\n\n#u$c[username] #buy \n" . $plan['name_plan'] .
"\nRouter: " . $router_name .
"\nPrice: " . $plan['price'] + $tax);
"\nPrice: " . $total_cost);
}
} else {
r2(U . "home", 'e', 'Plan is not exists');
r2(U . "order/gateway/$routes[2]/$routes[3]", 'e', Lang::T("Insufficient balance"));
}
break;
@ -440,6 +438,11 @@ switch ($action) {
}
case 'buy':
$gateway = _post('gateway');
print_r($routes);
if($gateway == 'balance') {
unset($_SESSION['gateway']);
r2(U . 'order/pay/' . $routes[2] . '/' . $routes[3]);
}
if (empty($gateway) && !empty($_SESSION['gateway'])) {
$gateway = $_SESSION['gateway'];
} else if (!empty($gateway)) {

View File

@ -878,5 +878,12 @@
"Token_has_expired__Please_log_in_again_": "Token has expired. Please log in again.",
"Minute": "Minute",
"Hour": "Hour",
"Failed_to_connect_to_device": "Failed to connect to device"
"Failed_to_connect_to_device": "Failed to connect to device",
"Custom_Balance": "Custom Balance",
"Input_Desired_Amount": "Input Desired Amount",
"Security": "Security",
"Enable_CSRF_Validation": "Enable CSRF Validation",
"Cross_site_request_forgery": "Cross-site request forgery",
"Validity_Periode": "Validity Periode",
"Insufficient_balance": "Insufficient balance"
}

View File

@ -35,7 +35,8 @@
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}
{if !empty($plan['price_old'])}
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
<sup
style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
{/if}
</td>
</tr>
@ -48,18 +49,10 @@
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
@ -99,7 +92,8 @@
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}
{if !empty($plan['price_old'])}
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
<sup
style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
{/if}
</td>
</tr>
@ -112,18 +106,10 @@
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/radius/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
@ -164,7 +150,8 @@
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}
{if !empty($plan['price_old'])}
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
<sup
style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
{/if}
</td>
</tr>
@ -177,18 +164,10 @@
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/pppoe/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/pppoe/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/pppoe/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
@ -227,7 +206,8 @@
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}
{if !empty($plan['price_old'])}
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
<sup
style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
{/if}
</td>
</tr>
@ -240,16 +220,9 @@
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/hotspot/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/hotspot/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwritten')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
<a href="{$_url}order/send/hotspot/{$plan['id']}&stoken={App::getToken()}"
@ -302,7 +275,8 @@
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}
{if !empty($plan['price_old'])}
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
<sup
style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
{/if}
</td>
</tr>
@ -315,18 +289,10 @@
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
@ -364,7 +330,8 @@
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}
{if !empty($plan['price_old'])}
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
<sup
style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
{/if}
</td>
</tr>
@ -377,18 +344,10 @@
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
@ -426,7 +385,8 @@
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}
{if !empty($plan['price_old'])}
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
<sup
style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
{/if}
</td>
</tr>
@ -439,18 +399,10 @@
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
@ -492,7 +444,8 @@
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}
{if !empty($plan['price_old'])}
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
<sup
style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
{/if}
</td>
</tr>
@ -505,18 +458,10 @@
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
@ -552,7 +497,8 @@
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}
{if !empty($plan['price_old'])}
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
<sup
style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
{/if}
</td>
</tr>
@ -565,18 +511,10 @@
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
@ -612,7 +550,8 @@
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}
{if !empty($plan['price_old'])}
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
<sup
style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
{/if}
</td>
</tr>
@ -625,18 +564,10 @@
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>

View File

@ -19,9 +19,12 @@
<label class="col-md-4">{Lang::T('Payment Gateway')}</label>
<div class="col-md-8">
<select name="gateway" id="gateway" class="form-control">
{if $_c['enable_balance'] == 'yes'}
<option value="balance">{Lang::T('Balance')} {Lang::moneyFormat($_user['balance'])}
</option>
{/if}
{foreach $pgs as $pg}
<option value="{$pg}">
{ucwords($pg)}</option>
<option value="{$pg}">{ucwords($pg)}</option>
{/foreach}
</select>
</div>
@ -116,7 +119,8 @@
{/if}
</ul>
<center>
<button type="submit" class="btn btn-primary">{Lang::T('Pay Now')}</button><br>
<button type="submit" class="btn btn-primary"
onclick="return confirm('{Lang::T("Are You Sure?")}')">{Lang::T('Pay Now')}</button><br>
<a class="btn btn-link" href="{$_url}home">{Lang::T('Cancel')}</a>
</center>
</form>
@ -148,7 +152,8 @@
</li>
</ul>
<center>
<button type="submit" class="btn btn-primary">{Lang::T('Pay Now')}</button><br>
<button type="submit" class="btn btn-primary"
onclick="return confirm('{Lang::T("Are You Sure?")}')">{Lang::T('Pay Now')}</button><br>
<a class="btn btn-link" href="{$_url}home">{Lang::T('Cancel')}</a>
</center>
</form>