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
周少峰
8 years ago
Commit
19cccd49c1dd8610e96cbc2265a9453cbf01aaef
1 parent
47f4be79
result
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
10 deletions
template/www.yohobuy.com/actions/pay/payreturn/index.phtml
template/www.yohobuy.com/actions/pay/payreturn/wechatqrcodereturn.phtml
template/www.yohobuy.com/partials/pay/point.phtml
yohobuy/www.yohobuy.com/application/models/Shopping/Payment.php
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Payreturn.php
template/www.yohobuy.com/actions/pay/payreturn/index.phtml
View file @
19cccd4
...
...
@@ -57,4 +57,5 @@
{
{/
payNotice
}
}
</div>
{
{>
pay/pay-analysis
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
{
{>
pay/point
}
}
\ No newline at end of file
...
...
template/www.yohobuy.com/actions/pay/payreturn/wechatqrcodereturn.phtml
View file @
19cccd4
...
...
@@ -35,4 +35,5 @@
</div>
{
{/
payData
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
{
{>
pay/point
}
}
\ No newline at end of file
...
...
template/www.yohobuy.com/partials/pay/point.phtml
View file @
19cccd4
...
...
@@ -2,7 +2,7 @@
<script
type=
"text/javascript"
>
window.onload
=
function
()
{
//
埋点
window.addPoint('YB_SC_PAY
MENT_TOPAY_CLICK',
{ORDER_CODE:
"{{orderCode}}"
,
PAY_RES
:
"{{result}}"
,
ORDER_AMOUNT
:
"{{amount}}"
,
PAY_STYLE
:
"{{payWayId
}}"
,
PRD_SKN
:
"{{proSkn}}"
,
PRD_SKU
:
"{{proSku}}"
}
);
window.addPoint('YB_SC_PAY
_RES',
{ORDER_CODE:
"{{orderCode}}"
,
PAY_RES
:
"{{payResult}}"
,
ORDER_AMOUNT
:
"{{amount}}"
,
PAY_STYLE
:
"{{payStyle
}}"
,
PRD_SKN
:
"{{proSkn}}"
,
PRD_SKU
:
"{{proSku}}"
}
);
}
</script>
{
{/
point
}
}
\ No newline at end of file
...
...
yohobuy/www.yohobuy.com/application/models/Shopping/Payment.php
View file @
19cccd4
...
...
@@ -279,6 +279,7 @@ class PaymentModel
self
::
$code
[
'data'
]
=
array
(
'pay'
=>
$amount
,
'orderNum'
=>
$orderData
[
'order_code'
],
'items'
=>
$orderData
[
'order_goods'
],
// 订单商品
'checkOrderUrl'
=>
Helpers
::
url
(
'/home/orders/detail'
,
array
(
'orderCode'
=>
$orderData
[
'order_code'
])),
'payMode'
=>
(
$orderData
[
'payment_type'
]
==
1
?
'在线支付'
:
'货到付款'
),
'currency'
=>
$orderData
[
'yoho_give_coin'
],
...
...
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Payreturn.php
View file @
19cccd4
...
...
@@ -19,7 +19,7 @@ class PayreturnController extends WebAction
{
$res
=
$this
->
getParseResponse
(
$_GET
,
2
);
$dealResult
=
$this
->
payResultProc
(
$res
,
2
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'支付宝'
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'支付宝'
,
'payWayId'
=>
2
);
$this
->
commonShowResult
(
$dealResult
);
}
...
...
@@ -56,7 +56,7 @@ class PayreturnController extends WebAction
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
array
(
'orderCode'
=>
$orderCode
));
$dealResult
=
$this
->
payResultProc
(
$res
,
21
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'微信扫码支付'
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'微信扫码支付'
,
'payWayId'
=>
21
);
}
while
(
false
);
$this
->
commonShowResult
(
$dealResult
);
...
...
@@ -69,7 +69,7 @@ class PayreturnController extends WebAction
UdpLog
::
info
(
"【银联web支付同步返回】,function:unionpaywebreturn,json参数"
,
json_encode
(
$_REQUEST
));
$res
=
$this
->
getParseResponse
(
$_REQUEST
,
25
);
$dealResult
=
$this
->
payResultProc
(
$res
,
25
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'银联在线支付'
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'银联在线支付'
,
'payWayId'
=>
25
);
$this
->
commonShowResult
(
$dealResult
);
}
/*
...
...
@@ -79,7 +79,7 @@ class PayreturnController extends WebAction
{
$res
=
$this
->
getParseResponse
(
$_GET
,
12
);
$dealResult
=
$this
->
payResultProc
(
$res
,
12
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'支联支付'
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'支联支付'
,
'payWayId'
=>
12
);
$this
->
commonShowResult
(
$dealResult
);
}
/**
...
...
@@ -112,16 +112,39 @@ class PayreturnController extends WebAction
{
$code
=
$dealResult
[
'code'
];
$view
=
'wechatqrcodereturn'
;
$sknArr
=
array
();
$skuArr
=
array
();
if
(
$dealResult
[
'data'
][
'items'
])
{
foreach
(
$dealResult
[
'data'
][
'items'
]
as
$val
)
{
$sknArr
[]
=
$val
[
'product_skn'
];
$skuArr
[]
=
$val
[
'product_sku'
];
}
}
// 埋点数据
$point
=
array
(
'orderCode'
=>
$dealResult
[
'data'
][
'orderNum'
],
'payResult'
=>
2
,
// 1 支付成功/2 支付失败
'amount'
=>
$dealResult
[
'data'
][
'pay'
],
'payStyle'
=>
$dealResult
[
'payData'
][
'payWayId'
],
'proSkn'
=>
implode
(
$sknArr
,
','
),
'proSku'
=>
implode
(
$skuArr
,
','
),
);
$data
=
array
(
'headerData'
=>
true
,
'payData'
=>
$dealResult
[
'payData'
]
'payData'
=>
$dealResult
[
'payData'
],
'point'
=>
$point
);
if
(
$code
==
200
)
{
$view
=
'index'
;
$data
=
array
(
'payNotice'
=>
$dealResult
[
'data'
]);
}
$point
[
'payResult'
]
=
1
;
// 支付结果
$data
=
array
(
'payNotice'
=>
$dealResult
[
'data'
],
'point'
=>
$point
);
}
//头部导航
$this
->
setSimpleHeader
();
$this
->
_view
->
display
(
$view
,
$data
);
...
...
Please
register
or
login
to post a comment