Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
80930a5e0dac56012f41b572934533236cc8a40d
1 parent
2a8d1aaf
添加友盟相关信息
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
library/LibModels/Wap/Home/CartData.php
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
library/LibModels/Wap/Home/CartData.php
View file @
80930a5
...
...
@@ -360,10 +360,11 @@ class CartData
* @param string $couponCode 优惠券码
* @param mixed $yohoCoin 使用的YOHO币数量或为空
* @param string $skuList 购买限购商品时需要传递的参数
* @param string $qhyUnion 友盟有关信息
* @param string|null $userAgent 联盟过来用户下单时需要的User-Agent信息
* @return array 接口返回的数据
*/
public
static
function
orderSub
(
$uid
,
$addressId
,
$cartType
,
$deliveryTime
,
$deliveryWay
,
$invoiceTitle
,
$invoiceId
,
$paymentId
,
$paymentType
,
$remark
,
$couponCode
,
$yohoCoin
,
$skuList
,
$userAgent
)
public
static
function
orderSub
(
$uid
,
$addressId
,
$cartType
,
$deliveryTime
,
$deliveryWay
,
$invoiceTitle
,
$invoiceId
,
$paymentId
,
$paymentType
,
$remark
,
$couponCode
,
$yohoCoin
,
$skuList
,
$
qhyUnion
,
$
userAgent
)
{
$param
=
Yohobuy
::
param
();
$param
[
'debug'
]
=
'Y'
;
...
...
@@ -396,6 +397,11 @@ class CartData
$param
[
'product_sku_list'
]
=
$skuList
;
}
// 友盟有关信息的传递
if
(
!
empty
(
$qhyUnion
))
{
$param
[
'qhy_union'
]
=
$qhyUnion
;
}
$param
[
'uid'
]
=
$uid
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
80930a5
...
...
@@ -628,10 +628,11 @@ class CartModel
* @param string $couponCode 优惠券码
* @param mixed $yohoCoin 使用的YOHO币数量或为空
* @param string $skuList 购买限购商品时需要传递的参数
* @param string $qhyUnio 友盟有关信息
* @param string|null $userAgent 联盟过来用户下单时需要的User-Agent信息
* @return array 接口返回的数据
*/
public
static
function
orderSub
(
$uid
,
$addressId
,
$cartType
,
$deliveryTime
,
$deliveryWay
,
$invoiceTitle
,
$invoiceId
,
$paymentId
,
$paymentType
,
$remark
,
$couponCode
,
$yohoCoin
,
$skuList
,
$userAgent
=
null
)
public
static
function
orderSub
(
$uid
,
$addressId
,
$cartType
,
$deliveryTime
,
$deliveryWay
,
$invoiceTitle
,
$invoiceId
,
$paymentId
,
$paymentType
,
$remark
,
$couponCode
,
$yohoCoin
,
$skuList
,
$
qhyUnio
=
''
,
$
userAgent
=
null
)
{
$result
=
array
(
'code'
=>
400
,
'message'
=>
'出错啦'
);
...
...
@@ -645,7 +646,7 @@ class CartModel
$result
[
'code'
]
=
403
;
$result
[
'message'
]
=
'请选择配送方式'
;
}
else
{
$orderSubRes
=
CartData
::
orderSub
(
$uid
,
$addressId
,
$cartType
,
$deliveryTime
,
$deliveryWay
,
$invoiceTitle
,
$invoiceId
,
$paymentId
,
$paymentType
,
$remark
,
$couponCode
,
$yohoCoin
,
$skuList
,
$userAgent
);
$orderSubRes
=
CartData
::
orderSub
(
$uid
,
$addressId
,
$cartType
,
$deliveryTime
,
$deliveryWay
,
$invoiceTitle
,
$invoiceId
,
$paymentId
,
$paymentType
,
$remark
,
$couponCode
,
$yohoCoin
,
$skuList
,
$
qhyUnio
,
$
userAgent
);
if
(
$orderSubRes
&&
isset
(
$orderSubRes
[
'code'
]))
{
$result
=
$orderSubRes
;
}
...
...
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
View file @
80930a5
...
...
@@ -449,6 +449,7 @@ class IndexController extends AbstractAction
/* 判断是否是友盟过来的用户 */
$userAgent
=
null
;
$unionKey
=
''
;
if
(
!
empty
(
$_COOKIE
[
'_QYH_UNION'
]))
{
/* 解密客户端联盟信息 */
$unionKey
=
AuthCode
::
decode
(
$_COOKIE
[
'_QYH_UNION'
],
'q_union_yohobuy'
);
...
...
@@ -458,7 +459,7 @@ class IndexController extends AbstractAction
$userAgent
=
isset
(
$unionInfo
[
'client_id'
])
?
'YOHO!Buy/3.8.2.259(Model/PC;Channel/'
.
$unionInfo
[
'client_id'
]
.
';uid/'
.
$uid
.
')'
:
null
;
}
$result
=
CartModel
::
orderSub
(
$uid
,
$addressId
,
$cartType
,
$deliveryTime
,
$deliveryWay
,
$invoiceTitle
,
$invoiceId
,
$paymentId
,
$paymentType
,
$remark
,
$couponCode
,
$yohoCoin
,
$skuList
,
$userAgent
);
$result
=
CartModel
::
orderSub
(
$uid
,
$addressId
,
$cartType
,
$deliveryTime
,
$deliveryWay
,
$invoiceTitle
,
$invoiceId
,
$paymentId
,
$paymentType
,
$remark
,
$couponCode
,
$yohoCoin
,
$skuList
,
$u
nionKey
,
$u
serAgent
);
// 记录下单异常的数据
if
(
empty
(
$result
))
{
...
...
Please
register
or
login
to post a comment