|
@@ -1857,7 +1857,6 @@ class WholeController extends Curd
|
|
|
$result = json_encode($result);
|
|
|
$params['pay_json_response'] = $result;
|
|
|
$result = json_decode($result, true);
|
|
|
- dump("resulr", $result);
|
|
|
|
|
|
$prefix = substr($params['qrcode_nbr'], 0, 2);
|
|
|
if (in_array($prefix, [10, 11, 12, 13, 14, 15])) {
|
|
@@ -1865,11 +1864,13 @@ class WholeController extends Curd
|
|
|
if ((!isset($result['return_code']) || $result['return_code'] != 'SUCCESS') || (!isset($result['result_code']) || $result['result_code'] != 'SUCCESS') || (empty($result['trade_state']) || $result['trade_state'] != 'SUCCESS')) {
|
|
|
$params['order_status_system'] = 'PAYING';
|
|
|
$params['order_status_payment'] = 'PENDING';
|
|
|
+ $params['order_is_complete'] = 'N';
|
|
|
// Db::rollBack();
|
|
|
// return json_fail('支付失败');
|
|
|
} else {
|
|
|
$params['order_status_system'] = $systemStatus;
|
|
|
$params['order_status_payment'] = 'SUCCESS';
|
|
|
+ $params['order_is_complete'] = 'N';
|
|
|
}
|
|
|
} else if (in_array($prefix, [25, 26, 27, 28, 29, 30])) {
|
|
|
$params['pay_category'] = 'ALIPAY';
|
|
@@ -3957,7 +3958,7 @@ class WholeController extends Curd
|
|
|
$result = Pay::wechat(config('payment.wxpay'))->find($order->order_groupby, 'pos');
|
|
|
$result = json_decode(json_encode($result), true);
|
|
|
if (!empty($result['return_code']) && $result['return_code'] == 'SUCCESS' && !empty($result['result_code']) && $result['result_code'] == 'SUCCESS' && !empty($result['trade_state']) && $result['trade_state'] == 'SUCCESS') {
|
|
|
- if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'MEALS', 'VIP'])) {
|
|
|
+ if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'DISHES', 'MEALS', 'VIP'])) {
|
|
|
$order->order_is_complete = 'Y';
|
|
|
$order->order_status_system = 'DONE';
|
|
|
$order->order_status_payment = 'SUCCESS';
|
|
@@ -3968,7 +3969,7 @@ class WholeController extends Curd
|
|
|
// Sheet
|
|
|
OrderSheet::where('join_sheet_order_id', $orderId)->where('order_sheet_status', 'PAYING')->update(['order_sheet_status' => 'DONE']);
|
|
|
// 支付记录
|
|
|
- PayDetail::where('join_pay_order_id', $order->order_groupby)->where('pay_prepayid','WXPAY')->update(['pay_status'=>'SUCCESS']);
|
|
|
+ PayDetail::where('join_pay_order_id', $order->order_groupby)->where('pay_prepayid', 'WXPAY')->update(['pay_status' => 'SUCCESS']);
|
|
|
|
|
|
Db::commit();
|
|
|
return json_success('success');
|
|
@@ -3977,7 +3978,7 @@ class WholeController extends Curd
|
|
|
$result = Pay::alipay(config('payment.alipay'))->find($orderId);
|
|
|
$result = json_decode(json_encode($result), true);
|
|
|
if (!empty($result['code']) && $result['code'] == '10000' && !empty($result['trade_status']) && $result['trade_status'] == 'TRADE_SUCCESS') {
|
|
|
- if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'MEALS', 'VIP'])) {
|
|
|
+ if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'DISHES', 'MEALS', 'VIP'])) {
|
|
|
$order->order_is_complete = 'Y';
|
|
|
$order->order_status_system = 'DONE';
|
|
|
$order->order_status_payment = 'SUCCESS';
|
|
@@ -3988,7 +3989,7 @@ class WholeController extends Curd
|
|
|
// Sheet
|
|
|
OrderSheet::where('join_sheet_order_id', $orderId)->where('order_sheet_status', 'PAYING')->update(['order_sheet_status' => 'DONE']);
|
|
|
// 支付记录
|
|
|
- PayDetail::where('join_pay_order_id', $order->order_groupby)->where('pay_prepayid','WXPAY')->update(['pay_status'=>'SUCCESS']);
|
|
|
+ PayDetail::where('join_pay_order_id', $order->order_groupby)->where('pay_prepayid', 'WXPAY')->update(['pay_status' => 'SUCCESS']);
|
|
|
|
|
|
Db::commit();
|
|
|
return json_success('success');
|