...
|
...
|
@@ -798,9 +798,10 @@ class CartModel |
|
|
* @param string $skuList 购买限购商品时需要传递的参数
|
|
|
* @param string $qhyUnio 友盟有关信息
|
|
|
* @param string|null $userAgent 联盟过来用户下单时需要的User-Agent信息
|
|
|
* @param int $times
|
|
|
* @return array 接口返回的数据
|
|
|
*/
|
|
|
public static function orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoices, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $skuList, $qhyUnio = '', $userAgent = null)
|
|
|
public static function orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoices, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $skuList, $qhyUnio = '', $userAgent = null, $times = 1)
|
|
|
{
|
|
|
$result = array('code' => 400, 'message' => '出错啦');
|
|
|
|
...
|
...
|
@@ -816,11 +817,33 @@ class CartModel |
|
|
UdpLog::info('【结算信息】配送方式参数校验','deliveryWay为空');
|
|
|
$result['code'] = 403;
|
|
|
$result['message'] = '请选择配送方式';
|
|
|
}
|
|
|
else {
|
|
|
$orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoices, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $skuList, $qhyUnio, $userAgent);
|
|
|
} else {
|
|
|
$orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoices, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $skuList, $qhyUnio, $userAgent, $times);
|
|
|
UdpLog::info('【结算信息】接口返回','orderSubRes'.json_encode($orderSubRes));
|
|
|
if ($orderSubRes && isset($orderSubRes['code'])) {
|
|
|
|
|
|
if (isset($orderSubRes['data'])
|
|
|
&& isset($orderSubRes['data']['is_hint'])
|
|
|
&& $orderSubRes['data']['is_hint'] === 'Y') {
|
|
|
|
|
|
$result['code'] = 409;
|
|
|
|
|
|
if (isset($orderSubRes['data']['hintInfo'])) {
|
|
|
$result['message'] = array(
|
|
|
$orderSubRes['data']['hintInfo']['productName'] . $orderSubRes['data']['hintInfo']['suffix'],
|
|
|
$orderSubRes['data']['hintInfo']['lastLine']
|
|
|
);
|
|
|
}
|
|
|
|
|
|
$result['buttons'] = array(
|
|
|
array(
|
|
|
'href' => Helpers::url('/cart/index'),
|
|
|
'text' => '重新选择商品',
|
|
|
),
|
|
|
array(
|
|
|
'text' => '继续结算',
|
|
|
'class' => 'order-tip-btnred'
|
|
|
));
|
|
|
} else if ($orderSubRes && isset($orderSubRes['code'])) {
|
|
|
$result = $orderSubRes;
|
|
|
}
|
|
|
}
|
...
|
...
|
|