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
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
ded7b16d3efb714cef3d9b4ae9c752cbc774cb99
2 parents
dd9e4c50
d47db60f
Merge branch 'develop'
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
2 deletions
library/Api/Yohobuy.php
library/LibModels/Wap/Home/OrderData.php
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/configs/routes.index.ini
library/Api/Yohobuy.php
View file @
ded7b16
...
...
@@ -143,6 +143,7 @@ class Yohobuy
if
(
!
empty
(
$data
))
{
$url
=
self
::
httpBuildQuery
(
$url
,
$data
);
}
echo
$url
;
/* 开启缓存的情况 */
if
(
$cache
&&
USE_CACHE
)
{
...
...
library/LibModels/Wap/Home/OrderData.php
View file @
ded7b16
...
...
@@ -135,5 +135,20 @@ class OrderData
//调用接口获得数据
return
Yohobuy
::
get
(
Yohobuy
::
SERVICE_URL
.
'/operations/api/v5/resource/get'
,
$param
);
}
/*
* 微信支付签名
*/
public
static
function
weixinPaySign
(
$orderCode
)
{
//构建必传参数
$param
[
'private_key'
]
=
'adbf5a778175ee757c34d0eba4e932bc'
;
$param
[
'order_code'
]
=
$orderCode
;
$param
[
'payment_code'
]
=
19
;
$param
[
'app_key'
]
=
'adbf5a778175ee75'
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
//调用接口获得数据
return
Yohobuy
::
get
(
'http://pay.yohobuy.com/payment/data.html'
,
$param
);
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
ded7b16
...
...
@@ -775,7 +775,6 @@ class HomeController extends AbstractAction
/*
* 我的订单-付款跳转页
*/
public
function
payAction
()
{
// 审判跳转登录页
...
...
@@ -813,6 +812,36 @@ class HomeController extends AbstractAction
'hasWxShare'
=>
strpos
(
$this
->
server
(
'HTTP_USER_AGENT'
,
''
),
'MicroMessenger'
)
!==
false
));
}
/**
* 微信支付 API
*/
public
function
weixinapiAction
()
{
do
{
if
(
!
$this
->
isAjax
())
{
break
;
}
$uid
=
$this
->
getUid
(
true
);
if
(
!
$uid
)
{
break
;
}
$orderCode
=
$this
->
get
(
'order_code'
);
if
(
empty
(
$orderCode
))
{
break
;
}
$result
=
OrderData
::
weixinPaySign
(
$orderCode
);
if
(
empty
(
$result
[
'data'
]))
{
break
;
}
$this
->
echoJson
(
$result
[
'data'
]);
}
while
(
false
);
}
// /*
// * 我的订单-确认收货
...
...
yohobuy/m.yohobuy.com/configs/routes.index.ini
View file @
ded7b16
...
...
@@ -159,4 +159,11 @@ routes.cart.type = "rewrite"
routes.cart.match
=
"/home/order/detail$"
routes.cart.route.module
=
Index
routes.cart.route.controller
=
Home
routes.cart.route.action
=
Homedetail
\ No newline at end of file
routes.cart.route.action
=
homedetail
; 微信支付接口
routes.weixinapi.type
=
"rewrite"
routes.weixinapi.match
=
"/shopping/pay/wechatwapapi$"
routes.weixinapi.route.module
=
Index
routes.weixinapi.route.controller
=
Home
routes.weixinapi.route.action
=
Weixinapi
\ No newline at end of file
...
...
Please
register
or
login
to post a comment