Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
haishi
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
haishi
Commits
66a4900b
Commit
66a4900b
authored
Mar 26, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
49c7385a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
api/Appapi/Api/Charge.php
+13
-5
No files found.
api/Appapi/Api/Charge.php
View file @
66a4900b
<?php
<?php
include
'./Wxpay.php'
;
class
Api_Charge
extends
PhalApi_Api
{
class
Api_Charge
extends
PhalApi_Api
{
public
function
getRules
()
{
public
function
getRules
()
{
...
@@ -50,6 +47,17 @@ class Api_Charge extends PhalApi_Api {
...
@@ -50,6 +47,17 @@ class Api_Charge extends PhalApi_Api {
return
$orderid
;
return
$orderid
;
}
}
protected
function
getWx
(
$configpri
,
$configpub
)
{
return
Yansongda\Pay\Pay
::
wechat
([
'appid'
=>
$configpri
[
'wx_appid'
],
'appSecret'
=>
$configpri
[
'wx_appsecret'
],
'mch_id'
=>
$configpri
[
'wx_mchid'
],
'key'
=>
$configpri
[
'wx_key'
],
'notify_url'
=>
$configpub
[
'site'
]
.
'/index.php?g=Appapi&m=pay&a=notify_wx'
,
]);
}
/**
/**
* 微信支付
* 微信支付
* @desc 用于 微信支付 获取订单号
* @desc 用于 微信支付 获取订单号
...
@@ -85,8 +93,8 @@ class Api_Charge extends PhalApi_Api {
...
@@ -85,8 +93,8 @@ class Api_Charge extends PhalApi_Api {
$rs
[
'msg'
]
=
'微信未配置'
;
$rs
[
'msg'
]
=
'微信未配置'
;
return
$rs
;
return
$rs
;
}
}
$wxpay
=
new
Wxpay
();
var_dump
(
$wxpay
);
var_dump
(
1
);
die
;
die
;
$orderinfo
=
array
(
$orderinfo
=
array
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment