mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-11-30 02:49:03 +08:00
订单提交优化
This commit is contained in:
parent
2a919f4237
commit
5979814ba4
@ -269,7 +269,7 @@ class Order extends Common
|
||||
{
|
||||
$params = $this->data_request;
|
||||
$params['admin'] = $this->admin;
|
||||
return OrderService::AdminPay($params);
|
||||
return OrderService::OrderPaymentUnderLinePay($params);
|
||||
}
|
||||
}
|
||||
?>
|
@ -921,9 +921,8 @@ class BuyService
|
||||
// 商品总数
|
||||
$count = count($params['goods']);
|
||||
|
||||
// 提交订单则需要存在多个商品的时候校验
|
||||
// 是否需要校验商品类型
|
||||
$is_check_goods_site_type = (!isset($params['is_buy']) || $params['is_buy'] != 1 || ($count > 1 && $params['is_buy'] == 1));
|
||||
// 是否需要校验商品类型、is_buy指定需要校验或商品大于1
|
||||
$is_check_goods_site_type = ((isset($params['is_buy']) && $params['is_buy'] == 1) || ($count > 1 && (!isset($params['is_buy']) || $params['is_buy'] == 1)));
|
||||
|
||||
// 数据校验
|
||||
foreach($params['goods'] as $v)
|
||||
|
@ -397,7 +397,7 @@ class OrderService
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员订单支付
|
||||
* 线下订单支付
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -405,7 +405,7 @@ class OrderService
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function AdminPay($params = [])
|
||||
public static function OrderPaymentUnderLinePay($params = [])
|
||||
{
|
||||
// 请求参数
|
||||
$p = [
|
||||
@ -414,11 +414,6 @@ class OrderService
|
||||
'key_name' => 'id',
|
||||
'error_msg' => '订单id有误',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'admin',
|
||||
'error_msg' => '管理员信息有误',
|
||||
],
|
||||
];
|
||||
$ret = ParamsChecked($params, $p);
|
||||
if($ret !== true)
|
||||
@ -751,6 +746,10 @@ class OrderService
|
||||
public static function NotifyHandle($data, $payment)
|
||||
{
|
||||
// 支付订单数据
|
||||
if(empty($data['out_trade_no']))
|
||||
{
|
||||
return DataReturn('订单号为空[out_trade_no]', -1);
|
||||
}
|
||||
$pay_data = self::OrderPayLogValueList($data['out_trade_no']);
|
||||
if($pay_data['code'] == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user