|
@@ -112,15 +112,22 @@ class Money extends Common
|
|
|
$money = (float)bcadd($amount, 0, 2);
|
|
|
// 生成订单
|
|
|
$epayConfig = get_addon_config('epay');
|
|
|
+ $configWhere['name'] = ['in',['wechat_service_fee','alipay_service_fee']];
|
|
|
+ $config = Db::name('config')->where($configWhere)->column('name,value');
|
|
|
+ $wechatFee = isset($config['wechat_service_fee']) ? (float)$config['wechat_service_fee'] : 0.00;
|
|
|
+ $alipayFee = isset($config['alipay_service_fee']) ? (float)$config['alipay_service_fee'] : 0.00;
|
|
|
if ($type == 'wechat') {
|
|
|
$payType = 1;
|
|
|
$businessNo = isset($epayConfig['wechat']['mch_id']) ? $epayConfig['wechat']['mch_id'] : '';
|
|
|
+ $serviceFee = $wechatFee;
|
|
|
} elseif ($type == 'alipay') {
|
|
|
$payType = 2;
|
|
|
$businessNo = isset($epayConfig['alipay']['app_id']) ? $epayConfig['alipay']['app_id'] : '';
|
|
|
+ $serviceFee = $alipayFee;
|
|
|
} else {
|
|
|
$payType = 3;
|
|
|
$businessNo = '';
|
|
|
+ $serviceFee = 0.00;
|
|
|
}
|
|
|
$recharOrderMode = new \app\common\model\RecharOrder();
|
|
|
$data["user_id"] = $user_id;
|
|
@@ -128,6 +135,7 @@ class Money extends Common
|
|
|
$data["money"] = $money;
|
|
|
$data["jewel"] = $jewel;
|
|
|
$data["pay_type"] = $payType;//支付渠道:1=微信,2=支付宝,3=衫德
|
|
|
+ $data["service_fee"] = $serviceFee;//手续费
|
|
|
$data["business_no"] = $businessNo;//商户号
|
|
|
$data["platform"] = $params_from;//1=安卓,2=ios
|
|
|
$data["createtime"] = $time;
|