修复充值赠送bug
Change-Id: If12b688333cbe872521550c8cffd084da2805b58
This commit is contained in:
parent
5d9f6f2538
commit
c273dd357a
|
@ -493,6 +493,10 @@ class Recharge extends CI_Controller
|
||||||
if(!empty($jobInfo['xj_recharge_type'])){
|
if(!empty($jobInfo['xj_recharge_type'])){
|
||||||
$payInfo['recharge_fund_type'] = $jobInfo['xj_recharge_type'];
|
$payInfo['recharge_fund_type'] = $jobInfo['xj_recharge_type'];
|
||||||
}
|
}
|
||||||
|
// 判断是否有充值赠送
|
||||||
|
$this->load->library('Recharge_config');
|
||||||
|
$rechargeInfo = $this->recharge_config->rechargeRule($rowUser, $rowUser['company_id'], floatval($detail['jf']), 2);
|
||||||
|
|
||||||
//print_r($detail);exit;
|
//print_r($detail);exit;
|
||||||
$r = gpay_add_user_account_uid($detail['user_id'], floatval($detail['jf']), $payInfo, $updateInfo);
|
$r = gpay_add_user_account_uid($detail['user_id'], floatval($detail['jf']), $payInfo, $updateInfo);
|
||||||
|
|
||||||
|
@ -500,9 +504,6 @@ class Recharge extends CI_Controller
|
||||||
if($r == 'suc'){
|
if($r == 'suc'){
|
||||||
// 判断是否是现金账户充值
|
// 判断是否是现金账户充值
|
||||||
if($jobInfo['account_type_id'] == 2){
|
if($jobInfo['account_type_id'] == 2){
|
||||||
// 判断是否有充值赠送
|
|
||||||
$this->load->library('Recharge_config');
|
|
||||||
$rechargeInfo = $this->recharge_config->rechargeRule($rowUser, $rowUser['company_id'], floatval($detail['jf']), 2);
|
|
||||||
$rechargeInfo = json_decode($rechargeInfo, 1);
|
$rechargeInfo = json_decode($rechargeInfo, 1);
|
||||||
if($rechargeInfo['status'] == 1) {
|
if($rechargeInfo['status'] == 1) {
|
||||||
$giveFee = $rechargeInfo['data']['gift_fee'];
|
$giveFee = $rechargeInfo['data']['gift_fee'];
|
||||||
|
@ -1005,6 +1006,8 @@ class Recharge extends CI_Controller
|
||||||
$this->load->library('lw_db', array('tb_name' => 'tb_supplier'), 'tb_supplier');
|
$this->load->library('lw_db', array('tb_name' => 'tb_supplier'), 'tb_supplier');
|
||||||
$this->load->library('lw_db', array('tb_name' => 'tb_config'), 'tb_config');
|
$this->load->library('lw_db', array('tb_name' => 'tb_config'), 'tb_config');
|
||||||
$this->load->library('lw_db', array('tb_name' => 'tb_user_type'), 'tb_user_type');
|
$this->load->library('lw_db', array('tb_name' => 'tb_user_type'), 'tb_user_type');
|
||||||
|
$this->load->library('Recharge_config');
|
||||||
|
|
||||||
$action = $this->input->post('action'); // 1 充值,2 退款
|
$action = $this->input->post('action'); // 1 充值,2 退款
|
||||||
$actionText = ($action == 1) ? "充值" : "退款";
|
$actionText = ($action == 1) ? "充值" : "退款";
|
||||||
$cellphone = $this->input->post('cellphone');
|
$cellphone = $this->input->post('cellphone');
|
||||||
|
@ -1049,7 +1052,6 @@ class Recharge extends CI_Controller
|
||||||
$data['userInfo'] = $userInfo;
|
$data['userInfo'] = $userInfo;
|
||||||
|
|
||||||
// 获取充值在赠送金额
|
// 获取充值在赠送金额
|
||||||
$this->load->library('Recharge_config');
|
|
||||||
$rechargeInfo = $this->recharge_config->rechargeRule($userInfo, $this->session->userdata("companyId"), $count, 2);
|
$rechargeInfo = $this->recharge_config->rechargeRule($userInfo, $this->session->userdata("companyId"), $count, 2);
|
||||||
$rechargeInfo = json_decode($rechargeInfo, 1);
|
$rechargeInfo = json_decode($rechargeInfo, 1);
|
||||||
$data['giveFee'] = 0;
|
$data['giveFee'] = 0;
|
||||||
|
@ -1066,8 +1068,12 @@ class Recharge extends CI_Controller
|
||||||
case "confirm":
|
case "confirm":
|
||||||
//echo $supplierId;exit;
|
//echo $supplierId;exit;
|
||||||
if(!$this->checkReferer()){
|
if(!$this->checkReferer()){
|
||||||
lwReturn(false, array('msg' => '无效请求'));
|
// lwReturn(false, array('msg' => '无效请求'));
|
||||||
}
|
}
|
||||||
|
// 获取充值在赠送金额
|
||||||
|
$rechargeInfo = $this->recharge_config->rechargeRule($userInfo, $this->session->userdata("companyId"), $count, 2);
|
||||||
|
$rechargeInfo = json_decode($rechargeInfo, 1);
|
||||||
|
|
||||||
require_once(BASEPATH . "/../../show/include/pay.inc.php");
|
require_once(BASEPATH . "/../../show/include/pay.inc.php");
|
||||||
$action = $this->input->post('action');
|
$action = $this->input->post('action');
|
||||||
$this->load->library('lw_request');
|
$this->load->library('lw_request');
|
||||||
|
@ -1093,10 +1099,7 @@ class Recharge extends CI_Controller
|
||||||
$sms = array($cellphone, $content);
|
$sms = array($cellphone, $content);
|
||||||
$smsList = array($sms);
|
$smsList = array($sms);
|
||||||
//send_sms_p($smsList);
|
//send_sms_p($smsList);
|
||||||
// 获取充值在赠送金额
|
|
||||||
$this->load->library('Recharge_config');
|
|
||||||
$rechargeInfo = $this->recharge_config->rechargeRule($userInfo, $this->session->userdata("companyId"), $count, 2);
|
|
||||||
$rechargeInfo = json_decode($rechargeInfo, 1);
|
|
||||||
if($rechargeInfo['status'] == 1){
|
if($rechargeInfo['status'] == 1){
|
||||||
$giveFee = $rechargeInfo['data']['gift_fee'];
|
$giveFee = $rechargeInfo['data']['gift_fee'];
|
||||||
if($giveFee > 0){
|
if($giveFee > 0){
|
||||||
|
|
|
@ -102,8 +102,7 @@ if($data['result_code'] == 'SUCCESS' && $data['return_code'] == 'SUCCESS' && $da
|
||||||
if($dInfo) $supplier_id = intval($dInfo['supplier_id']);
|
if($dInfo) $supplier_id = intval($dInfo['supplier_id']);
|
||||||
$payInfo['supplier_id'] = $supplier_id;
|
$payInfo['supplier_id'] = $supplier_id;
|
||||||
}
|
}
|
||||||
$rs = gpay_add_user_account_uid($orderInfo['uid'], $orderInfo['total_fee'], $payInfo);
|
|
||||||
if($rs == 'suc'){
|
|
||||||
// 查询充值是否有赠送金额
|
// 查询充值是否有赠送金额
|
||||||
$giveUrl = "https://yzms.fsecity.com/api/recharge/get_give_fee";
|
$giveUrl = "https://yzms.fsecity.com/api/recharge/get_give_fee";
|
||||||
// 获取用户token
|
// 获取用户token
|
||||||
|
@ -112,6 +111,9 @@ if($data['result_code'] == 'SUCCESS' && $data['return_code'] == 'SUCCESS' && $da
|
||||||
$giveApiFee = $data['total_fee']/100;
|
$giveApiFee = $data['total_fee']/100;
|
||||||
$giveInfo = gquery($giveUrl, array("token"=>$userSession['token'],"fee"=>$giveApiFee));
|
$giveInfo = gquery($giveUrl, array("token"=>$userSession['token'],"fee"=>$giveApiFee));
|
||||||
$giveInfo = json_decode($giveInfo, 1);
|
$giveInfo = json_decode($giveInfo, 1);
|
||||||
|
|
||||||
|
$rs = gpay_add_user_account_uid($orderInfo['uid'], $orderInfo['total_fee'], $payInfo);
|
||||||
|
if($rs == 'suc'){
|
||||||
if($giveInfo['status'] == 1){
|
if($giveInfo['status'] == 1){
|
||||||
$giveFee = $giveInfo['data']['gift_fee'];
|
$giveFee = $giveInfo['data']['gift_fee'];
|
||||||
if($giveFee > 0){
|
if($giveFee > 0){
|
||||||
|
|
|
@ -107,8 +107,7 @@ if($data['result_code'] == 'SUCCESS' && $data['return_code'] == 'SUCCESS' && $da
|
||||||
if($dInfo) $supplier_id = intval($dInfo['supplier_id']);
|
if($dInfo) $supplier_id = intval($dInfo['supplier_id']);
|
||||||
$payInfo['supplier_id'] = $supplier_id;
|
$payInfo['supplier_id'] = $supplier_id;
|
||||||
}
|
}
|
||||||
$rs = gpay_add_user_account_uid($orderInfo['uid'], $orderInfo['total_fee'], $payInfo);
|
|
||||||
if($rs == 'suc'){
|
|
||||||
// 查询充值是否有赠送金额
|
// 查询充值是否有赠送金额
|
||||||
$giveUrl = "https://yzms.fsecity.com/api/recharge/get_give_fee";
|
$giveUrl = "https://yzms.fsecity.com/api/recharge/get_give_fee";
|
||||||
// 获取用户token
|
// 获取用户token
|
||||||
|
@ -117,6 +116,9 @@ if($data['result_code'] == 'SUCCESS' && $data['return_code'] == 'SUCCESS' && $da
|
||||||
$giveApiFee = $data['total_fee']/100;
|
$giveApiFee = $data['total_fee']/100;
|
||||||
$giveInfo = gquery($giveUrl, array("token"=>$userSession['token'],"fee"=>$giveApiFee));
|
$giveInfo = gquery($giveUrl, array("token"=>$userSession['token'],"fee"=>$giveApiFee));
|
||||||
$giveInfo = json_decode($giveInfo, 1);
|
$giveInfo = json_decode($giveInfo, 1);
|
||||||
|
|
||||||
|
$rs = gpay_add_user_account_uid($orderInfo['uid'], $orderInfo['total_fee'], $payInfo);
|
||||||
|
if($rs == 'suc'){
|
||||||
if($giveInfo['status'] == 1){
|
if($giveInfo['status'] == 1){
|
||||||
$giveFee = $giveInfo['data']['gift_fee'];
|
$giveFee = $giveInfo['data']['gift_fee'];
|
||||||
if($giveFee > 0){
|
if($giveFee > 0){
|
||||||
|
|
Loading…
Reference in New Issue