...
|
...
|
@@ -422,6 +422,30 @@ class IndexController extends AbstractAction |
|
|
$couponCode = $this->post('couponCode', null);
|
|
|
$yohoCoin = $this->post('yohoCoin', 1);
|
|
|
$result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin);
|
|
|
|
|
|
// 记录下单异常的数据
|
|
|
if (empty($result)) {
|
|
|
$message = 'uid:' . $uid . ',addressId:' . $addressId . ',cartType:' . $cartType . ',deliveryTime:' . $deliveryTime
|
|
|
. ',deliveryWay:' . $deliveryWay . 'invoiceTitle:' . $invoiceTitle . ',invoiceId:' . $invoiceId . ',yohoCoin:' . $yohoCoin
|
|
|
. ',paymentId:' . $paymentId . ',paymentType:' . $paymentType . ',remark:' . $remark . ',couponCode:' . $couponCode . "\n";
|
|
|
error_log($message, 3, '/Data/logs/php/h5_error/order.' . date('Ym') . '.log');
|
|
|
}
|
|
|
else {
|
|
|
// 提交成功清除Cookie
|
|
|
$this->setCookie('order-info', null);
|
|
|
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
|
|
|
|
|
|
if ($uid && !empty($result['data'])) {
|
|
|
try {
|
|
|
UnionTrans::set($uid, $result['data']['order_code'], $result['data']['order_amount']);
|
|
|
} catch (Exception $e) {
|
|
|
// do nothing
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (empty($result)) {
|
...
|
...
|
@@ -432,13 +456,6 @@ class IndexController extends AbstractAction |
|
|
|
|
|
$this->echoJson($result);
|
|
|
|
|
|
if ($uid && !empty($result['data'])) {
|
|
|
try {
|
|
|
UnionTrans::set($uid, $result['data']['order_code'], $result['data']['order_amount']);
|
|
|
} catch (Exception $e) {
|
|
|
// do nothing
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|