|
@@ -4707,13 +4707,17 @@ class WholeController extends Curd
|
|
|
$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') {
|
|
|
$order->order_status_payment = 'SUCCESS';
|
|
|
-// if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'PACKAGE'])) {
|
|
|
-// $order->order_status_system = 'WAITING';
|
|
|
-// } else
|
|
|
- if (in_array($order->order_category, ['DISHES', 'MEALS'])) {
|
|
|
+ if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'PACKAGE'])) {
|
|
|
+ $order->order_status_system = 'WAITING';
|
|
|
+ } else if (in_array($order->order_category, ['DISHES', 'MEALS'])) {
|
|
|
$order->order_is_complete = 'Y';
|
|
|
$order->order_status_system = 'DONE';
|
|
|
- } else if (in_array($order->order_category, ['GOODS'])) {
|
|
|
+ } else if (in_array($order->order_category, ['VIP'])) {
|
|
|
+ if ($order->order_amount_paid == $order->order_amount_total) {
|
|
|
+ $order->order_status_system = 'DONE';
|
|
|
+ $order->order_is_complete = 'Y';
|
|
|
+ }
|
|
|
+ } else {
|
|
|
$order->order_status_system = 'SENDING';
|
|
|
}
|
|
|
$order->save();
|
|
@@ -4732,13 +4736,17 @@ class WholeController extends Curd
|
|
|
$result = json_decode(json_encode($result), true);
|
|
|
if (!empty($result['code']) && $result['code'] == '10000' && !empty($result['trade_status']) && $result['trade_status'] == 'TRADE_SUCCESS') {
|
|
|
$order->order_status_payment = 'SUCCESS';
|
|
|
-// if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD','PACKAGE'])){
|
|
|
-// $order->order_status_system = 'WAITING';
|
|
|
-// }else
|
|
|
- if (in_array($order->order_category, ['DISHES', 'MEALS'])) {
|
|
|
+ if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'PACKAGE'])) {
|
|
|
+ $order->order_status_system = 'WAITING';
|
|
|
+ } elseif (in_array($order->order_category, ['DISHES', 'MEALS'])) {
|
|
|
$order->order_is_complete = 'Y';
|
|
|
$order->order_status_system = 'DONE';
|
|
|
- } else if (in_array($order->order_category, ['GOODS'])) {
|
|
|
+ } else if (in_array($order->order_category, ['VIP'])) {
|
|
|
+ if ($order->order_amount_paid == $order->order_amount_total) {
|
|
|
+ $order->order_status_system = 'DONE';
|
|
|
+ $order->order_is_complete = 'Y';
|
|
|
+ }
|
|
|
+ } else {
|
|
|
$order->order_status_system = 'SENDING';
|
|
|
}
|
|
|
$order->save();
|