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
周奇琪
9 years ago
Commit
c5f07495a06b7781ba236ae3fef728c50e1f7b63
1 parent
0792d712
change template to only three pay type:alipay,wechat,unipay
add log notice or rerun action begin
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
10 deletions
template/www.yohobuy.com/actions/shopping/pay/index.phtml
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Notice.php
template/www.yohobuy.com/actions/shopping/pay/index.phtml
View file @
c5f0749
...
...
@@ -28,19 +28,24 @@
<div
id=
"tab-box"
>
<ul
class=
"tabs"
id=
"tabs"
>
<li
class=
"thistab"
><a
href=
"#"
tab=
"tab1"
>支付宝等平台</a></li>
<
li><a
href=
"#"
tab=
"tab2"
>使用银行卡</a></li
>
<
!--li><a
href=
"#"
tab=
"tab2"
>使用银行卡</a></li--
>
</ul>
<ul
class=
"tab-conbox"
>
<li
id=
"tab1"
class=
"tab-con"
>
<div
class=
"count"
>
{
{#
each
list
}
}
<div
class=
"mode"
data-id=
"{{dataId}}"
data-value=
"{{dataVal}}"
>
<div
id=
"{{idNum}}"
></div>
<img
src=
"{{ico}}"
alt=
"{{name}}"
id=
"{{imgId}}"
>
<div
class=
"mode"
data-id=
"2"
data-value=
"2_platform"
>
<div
id=
"2"
></div>
<img
src=
"http://static.yohobuy.com/images/pay/icon/zhifubao.png"
alt=
"支付宝"
id=
"2_platform"
>
</div>
<div
class=
"mode"
data-id=
"25"
data-value=
"25_platform"
>
<div
id=
"25"
></div>
<img
src=
"http://static.yohobuy.com/images/pay/icon/zaixianzhifu.png"
alt=
"银联在线支付"
id=
"25_platform"
>
</div>
<div
class=
"mode"
data-id=
"21"
data-value=
"21_platform"
>
<div
id=
"21"
></div>
<img
src=
"http://static.yohobuy.com/images/pay/icon/weixinzhifu.png"
alt=
"微信扫码支付"
id=
"21_platform"
>
</div>
{
{/each
}
}
</div>
</li>
...
...
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Notice.php
View file @
c5f0749
...
...
@@ -18,8 +18,15 @@ class NoticeController extends WebAction
// 向回调通知有关调用日志
const
ORDER_STATUS_LOG
=
'/Data/logs/pc_pay/order_status'
;
// 存储的UID键名
const
SESSION_UID_KEY
=
'payUserid'
;
const
SESSION_UID_KEY
=
'payUserid'
;
private
$log
=
null
;
public
function
init
()
{
parent
::
init
();
$this
->
log
=
new
PhpLog
(
self
::
ORDER_STATUS_LOG
,
'PRC'
,
self
::
LOG_LEVEL
);
}
/**
* 支付宝后台服务器返回,主要是用于补单
*/
...
...
@@ -27,6 +34,9 @@ class NoticeController extends WebAction
{
$payment
=
PayModel
::
getPaymentById
(
2
);
$payService
=
PayFactory
::
factory
(
$payment
);
$this
->
log
->
LogInfo
(
"begin alipaynoticeAction"
);
$res
=
$payService
->
parseResponse
(
$_POST
);
//支付宝通知使用的
if
(
$res
->
payResult
!=
-
1
)
{
$this
->
payResultProc
(
$res
,
2
);
...
...
@@ -40,6 +50,8 @@ class NoticeController extends WebAction
*/
public
function
alipayreturnAction
()
{
$this
->
log
->
LogInfo
(
"begin alipayreturnAction"
);
$payment
=
PayModel
::
getPaymentById
(
2
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_GET
);
...
...
@@ -53,6 +65,7 @@ class NoticeController extends WebAction
*/
public
function
alibarcodenoticeAction
()
{
$this
->
log
->
LogInfo
(
"begin alibarcodenoticeAction"
);
$payment
=
PayModel
::
getPaymentById
(
17
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_POST
);
//支付宝通知使用的
...
...
@@ -68,6 +81,7 @@ class NoticeController extends WebAction
*/
public
function
alibarcodereturnAction
()
{
$this
->
log
->
LogInfo
(
"begin alibarcodereturnAction"
);
$payment
=
PayModel
::
getPaymentById
(
17
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_GET
);
...
...
@@ -81,6 +95,7 @@ class NoticeController extends WebAction
*/
public
function
allinpaynoticeAction
()
{
$this
->
log
->
LogInfo
(
"begin allinpaynoticeAction"
);
$payment
=
PayModel
::
getPaymentById
(
16
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_POST
);
...
...
@@ -96,6 +111,7 @@ class NoticeController extends WebAction
*/
public
function
allinpayreturnAction
()
{
$this
->
log
->
LogInfo
(
"begin allinpayreturnAction"
);
$payment
=
PayModel
::
getPaymentById
(
16
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_POST
);
...
...
@@ -109,6 +125,7 @@ class NoticeController extends WebAction
*/
public
function
aliexpressgatewayreturnAction
()
{
$this
->
log
->
LogInfo
(
"begin aliexpressgatewayreturnAction"
);
$payment
=
PayModel
::
getPaymentById
(
13
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_GET
);
...
...
@@ -122,6 +139,7 @@ class NoticeController extends WebAction
*/
public
function
aliexpressgatewaynoticeAction
()
{
$this
->
log
->
LogInfo
(
"begin aliexpressgatewaynoticeAction"
);
$payment
=
PayModel
::
getPaymentById
(
13
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_POST
);
//支付宝通知使用的
...
...
@@ -137,6 +155,7 @@ class NoticeController extends WebAction
*/
public
function
alibanknoticeAction
()
{
$this
->
log
->
LogInfo
(
"begin alibanknoticeAction"
);
$payment
=
PayModel
::
getPaymentById
(
12
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_POST
);
...
...
@@ -154,6 +173,7 @@ class NoticeController extends WebAction
*/
public
function
alibankreturnAction
()
{
$this
->
log
->
LogInfo
(
"begin alibanknoticeAction"
);
$payment
=
PayModel
::
getPaymentById
(
12
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_GET
);
...
...
@@ -167,6 +187,7 @@ class NoticeController extends WebAction
*/
public
function
chinabankAction
()
{
$this
->
log
->
LogInfo
(
"begin chinabankAction"
);
$payment
=
PayModel
::
getPaymentById
(
4
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_POST
);
...
...
@@ -180,6 +201,7 @@ class NoticeController extends WebAction
*/
public
function
chinabankautorevAction
()
{
$this
->
log
->
LogInfo
(
"begin chinabankautorevAction"
);
$payment
=
PayModel
::
getPaymentById
(
4
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_POST
);
...
...
@@ -197,6 +219,7 @@ class NoticeController extends WebAction
*/
public
function
tenpayAction
()
{
$this
->
log
->
LogInfo
(
"begin tenpayAction"
);
$payment
=
PayModel
::
getPaymentById
(
1
);
$payService
=
PayFactory
::
factory
(
$payment
);
$rspParams
=
$payService
->
parseResponse
(
$_GET
);
//财付通是以get方式回复的。
...
...
@@ -209,6 +232,7 @@ class NoticeController extends WebAction
*/
public
function
shengpayreturnAction
()
{
$this
->
log
->
LogInfo
(
"begin shengpayreturnAction"
);
$payment
=
PayModel
::
getPaymentById
(
11
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_POST
);
...
...
@@ -222,6 +246,7 @@ class NoticeController extends WebAction
*/
public
function
shengpaynoticeAction
()
{
$this
->
log
->
LogInfo
(
"begin shengpaynoticeAction"
);
$payment
=
PayModel
::
getPaymentById
(
11
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_POST
);
...
...
@@ -237,6 +262,7 @@ class NoticeController extends WebAction
*/
public
function
wechatcallbackAction
()
{
$this
->
log
->
LogInfo
(
"begin wechatcallbackAction"
);
$callback
=
$this
->
get
(
'callback'
);
$orderCode
=
$this
->
get
(
'ordercode'
);
...
...
@@ -251,6 +277,7 @@ class NoticeController extends WebAction
*/
public
function
wechatqrcodenotifyAction
()
{
$this
->
log
->
LogInfo
(
"begin wechatqrcodenotifyAction"
);
$notify
=
new
PayNotifyCallBack
();
$notify
->
handle
(
false
);
}
...
...
@@ -260,6 +287,7 @@ class NoticeController extends WebAction
*/
public
function
wechatqrcodereturnAction
()
{
$this
->
log
->
LogInfo
(
"begin wechatqrcodereturnAction"
);
$dealResult
=
array
(
'code'
=>
500
,
'message'
=>
'支付失败'
...
...
@@ -286,6 +314,7 @@ class NoticeController extends WebAction
*/
public
function
unionpaywebreturnAction
()
{
$this
->
log
->
LogInfo
(
"begin unionpaywebreturnAction"
);
$payment
=
PayModel
::
getPaymentById
(
25
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_REQUEST
);
...
...
@@ -299,6 +328,7 @@ class NoticeController extends WebAction
*/
public
function
unionpaywebnoticeAction
()
{
$this
->
log
->
LogInfo
(
"begin unionpaywebnoticeAction"
);
$payment
=
PayModel
::
getPaymentById
(
25
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_REQUEST
);
...
...
@@ -315,6 +345,7 @@ class NoticeController extends WebAction
*/
public
function
alimobilenoticeminiAction
()
{
$this
->
log
->
LogInfo
(
"begin alimobilenoticeminiAction"
);
$payment
=
PayModel
::
getPaymentById
(
20
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
$_POST
);
//支付宝通知使用的
...
...
@@ -362,7 +393,7 @@ class NoticeController extends WebAction
private
function
payResultProc
(
$payResult
,
$payment
)
{
// 初始化日志
$log
=
new
PhpLog
(
self
::
ORDER_STATUS_LOG
,
'PRC'
,
self
::
LOG_LEVEL
)
;
$log
=
$this
->
log
;
$log
->
LogInfo
(
'================开始验证登录状态============'
);
$log
->
LogInfo
(
'================支付结果数据为============'
);
$log
->
LogInfo
(
var_export
(
$payResult
,
true
));
...
...
Please
register
or
login
to post a comment