fix payment_link
if url detected localhost, change your host in config.php to make work
This commit is contained in:
parent
06c68ccebd
commit
e0f150633c
@ -191,13 +191,14 @@ class Message
|
|||||||
|
|
||||||
if(strpos($msg, '[[payment_link]]')!== false){
|
if(strpos($msg, '[[payment_link]]')!== false){
|
||||||
// token only valid for 1 day, for security reason
|
// token only valid for 1 day, for security reason
|
||||||
$token = User::generateToken($customer['id'], 1);
|
$tokenArray = User::generateToken($customer['id'], 1);
|
||||||
|
$token = isset($tokenArray['token']) ? $tokenArray['token'] : '';
|
||||||
$tur = ORM::for_table('tbl_user_recharges')
|
$tur = ORM::for_table('tbl_user_recharges')
|
||||||
->where('customer_id', $customer['id'])
|
->where('customer_id', $customer['id'])
|
||||||
->where('namebp', $package)
|
->where('namebp', $package)
|
||||||
->find_one();
|
->find_one();
|
||||||
if($tur){
|
if($tur){
|
||||||
$url = APP_URL . '?_route=home&recharge='. $tur.'uid='. $token;
|
$url = APP_URL . '/?_route=home&recharge='. $tur['id'] .'&uid='. urlencode($token);
|
||||||
$msg = str_replace('[[payment_link]]', $url, $msg);
|
$msg = str_replace('[[payment_link]]', $url, $msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user