...
|
...
|
@@ -579,9 +579,6 @@ class CartModel |
|
|
do {
|
|
|
/* 调接口订单确认接口 */
|
|
|
$pay = CartData::cartPay($uid, $cartType);
|
|
|
//获取用户手机号码用于发票接收人
|
|
|
$userInfo = UserData::getUserInfo($uid);
|
|
|
|
|
|
if (!$pay || empty($pay['data']['goods_list'])) {
|
|
|
break;
|
|
|
}
|
...
|
...
|
@@ -698,14 +695,14 @@ class CartModel |
|
|
}
|
|
|
}
|
|
|
|
|
|
/* 发票内容 */
|
|
|
if (!empty($pay['data']['invoices']['invoiceContentList'])) {
|
|
|
foreach ($pay['data']['invoices']['invoiceContentList'] as $value) {
|
|
|
$result['piaoTypes'][$value['invoices_type_id']]['id'] = $value['invoices_type_id'];
|
|
|
$result['piaoTypes'][$value['invoices_type_id']]['name'] = $value['invoices_type_name'];
|
|
|
/* 发票类型 */
|
|
|
if (!empty($pay['data']['invoices']['invoices_type_list'])) {
|
|
|
$build = array();
|
|
|
foreach ($pay['data']['invoices']['invoices_type_list'] as $value) {
|
|
|
$build['id'] = $value['invoices_type_id'];
|
|
|
$build['name'] = $value['invoices_type_name'];
|
|
|
$result['piaoTypes'][] = $build;
|
|
|
}
|
|
|
$result['receiverMobile'] = isset($userInfo['data']['mobile']) && $userInfo['data']['mobile'] ? $userInfo['data']['mobile'] : '';
|
|
|
$result['invoiceUrl'] = 'http://www.yohobuy.com/help?category_id=99';
|
|
|
}
|
|
|
|
|
|
/* 需购买的商品 */
|
...
|
...
|
@@ -898,7 +895,7 @@ class CartModel |
|
|
* @param int $redEnvelopes 红包
|
|
|
* @return array 接口返回的数据
|
|
|
*/
|
|
|
public static function orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceType, $invoiceTitle, $invoiceContent, $receiverMobile, $paymentId, $paymentType, $remark, $couponCode,$promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes)
|
|
|
public static function orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode,$promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes)
|
|
|
{
|
|
|
$result = array('code' => 400, 'message' => self::ERROR_400_MESSAGE);
|
|
|
|
...
|
...
|
@@ -939,7 +936,7 @@ class CartModel |
|
|
$userAgent = isset($unionInfo['client_id']) ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' . $unionInfo['client_id'] . ';uid/' . $uid . ')' : null;
|
|
|
}
|
|
|
|
|
|
$orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceType, $invoiceTitle, $invoiceContent, $receiverMobile, $paymentId, $paymentType, $remark, $couponCode,$promotionCode,$yohoCoin, $isPreContact, $isPrintPrice,$unionKey,$userAgent, $redEnvelopes);
|
|
|
$orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode,$promotionCode,$yohoCoin, $isPreContact, $isPrintPrice,$unionKey,$userAgent, $redEnvelopes);
|
|
|
if ($orderSubRes && isset($orderSubRes['code'])) {
|
|
|
$result = $orderSubRes;
|
|
|
}
|
...
|
...
|
|