|
|
@@ -155,7 +155,7 @@ class OrderController extends BaseController
|
|
|
$capitalType = $typeList['xhOrder']['id'];
|
|
|
$totalFee = $order['actPrice'];
|
|
|
xhPayToolService::balancePay($orderSn, $totalFee, $capitalType, $couponId);
|
|
|
- util::success(['discountAmount'=>9.9,'discountType'=>0]);
|
|
|
+ util::success(['discountAmount' => 9.9, 'discountType' => 0]);
|
|
|
}
|
|
|
|
|
|
//获取商城下单要用的微信支付和小程序支付参数 shish 2019.21.3
|
|
|
@@ -167,7 +167,7 @@ class OrderController extends BaseController
|
|
|
$orderSn = isset($post['orderSn']) ? $post['orderSn'] : 0;
|
|
|
$order = OrderService::getByOrderSn($orderSn);
|
|
|
$orderId = $order['id'];
|
|
|
-
|
|
|
+
|
|
|
//验证订单有效性
|
|
|
OrderService::check($order, $this->userId);
|
|
|
|
|
|
@@ -397,7 +397,7 @@ class OrderController extends BaseController
|
|
|
$capitalType = $typeList['xhOrder']['id'];
|
|
|
$totalFee = $order['actPrice'];
|
|
|
xhPayToolService::balancePay($orderSn, $totalFee, $capitalType, $couponId);
|
|
|
- util::success(['discountAmount'=>9.9,'discountType'=>0]);
|
|
|
+ util::success(['discountAmount' => 9.9, 'discountType' => 0]);
|
|
|
} else {
|
|
|
util::fail('无效的支付方式');
|
|
|
}
|
|
|
@@ -427,10 +427,17 @@ class OrderController extends BaseController
|
|
|
//订单详情 shish 2019.12.16
|
|
|
public function actionDetail()
|
|
|
{
|
|
|
- $id = Yii::$app->request->get('id');
|
|
|
- $detail = OrderService::getOrderById($id);
|
|
|
+ $id = Yii::$app->request->get('id', 0);
|
|
|
+ $orderSn = Yii::$app->request->get('orderSn', '');
|
|
|
+ $detail = [];
|
|
|
+ if (!empty($id)) {
|
|
|
+ $detail = OrderService::getOrderById($id);
|
|
|
+ }
|
|
|
+ if (!empty($orderSn)) {
|
|
|
+ $detail = OrderService::getOrderBySn($orderSn);
|
|
|
+ }
|
|
|
OrderService::valid($detail, $this->merchantId);
|
|
|
util::success($detail);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|