app 和 小程序 都增加充值赠送
Change-Id: I83cbaa88f7caa76d2fb6804ea3950821295c0d93
This commit is contained in:
parent
98c62ea546
commit
36ad601ead
|
@ -103,7 +103,30 @@ if($data['result_code'] == 'SUCCESS' && $data['return_code'] == 'SUCCESS' && $da
|
|||
$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";
|
||||
// 获取用户token
|
||||
$userSession = $db->get_one("select * from tb_session where uid = ".$orderInfo['uid'] . " order by expire_time desc");
|
||||
$giveInfo = gquery($giveUrl, array("token"=>$userSession['token'],"fee"=>$data['total_fee']));
|
||||
$giveInfo = json_decode($giveInfo, 1);
|
||||
if($giveInfo['status'] == 1){
|
||||
$giveFee = $giveInfo['data']['gift_fee'];
|
||||
if($giveFee > 0){
|
||||
$rechargePayInfo = array(
|
||||
'admin_id' => 1,
|
||||
'rtype' => 1,
|
||||
'ac_type' => 1,
|
||||
'notes' => '充值赠送',
|
||||
);
|
||||
if(isset($supplier_id) && !empty($supplier_id)){
|
||||
$rechargePayInfo['supplier_id'] = $supplier_id;
|
||||
}
|
||||
$r = gpay_add_user_account_uid($orderInfo['uid'], floatval($giveFee), $rechargePayInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$db->query("update tb_recharge_pay_weixin set state=1,suctime=now(),transaction_id='".$data['transaction_id']."' where id=".$orderInfo['id']);
|
||||
//file_put_contents("1.txt", $_SERVER["HTTP_USER_AGENT"].": ".$UPTRANSEQ."\n\n\n", FILE_APPEND);
|
||||
if(!$wxrecv_isinclude) {
|
||||
|
|
|
@ -108,7 +108,30 @@ if($data['result_code'] == 'SUCCESS' && $data['return_code'] == 'SUCCESS' && $da
|
|||
$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";
|
||||
// 获取用户token
|
||||
$userSession = $db->get_one("select * from tb_session where uid = ".$orderInfo['uid'] . " order by expire_time desc");
|
||||
$giveInfo = gquery($giveUrl, array("token"=>$userSession['token'],"fee"=>$data['total_fee']));
|
||||
$giveInfo = json_decode($giveInfo, 1);
|
||||
if($giveInfo['status'] == 1){
|
||||
$giveFee = $giveInfo['data']['gift_fee'];
|
||||
if($giveFee > 0){
|
||||
$rechargePayInfo = array(
|
||||
'admin_id' => 1,
|
||||
'rtype' => 1,
|
||||
'ac_type' => 1,
|
||||
'notes' => '充值赠送',
|
||||
);
|
||||
if(isset($supplier_id) && !empty($supplier_id)){
|
||||
$rechargePayInfo['supplier_id'] = $supplier_id;
|
||||
}
|
||||
$r = gpay_add_user_account_uid($orderInfo['uid'], floatval($giveFee), $rechargePayInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$db->query("update tb_recharge_pay_weixin set state=1,suctime=now(),transaction_id='".$data['transaction_id']."' where id=".$orderInfo['id']);
|
||||
//file_put_contents("1.txt", $_SERVER["HTTP_USER_AGENT"].": ".$UPTRANSEQ."\n\n\n", FILE_APPEND);
|
||||
if(!$wxrecv_isinclude) {
|
||||
|
|
Loading…
Reference in New Issue