Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ldy
/
payment
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d9e51dc9
authored
May 09, 2024
by
yeran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update
1 parent
3b1c58cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
23 deletions
composer.json
examples/wx/wapCharge.php
src/Common/Weixin/Data/Charge/WapChargeData.php
composer.json
View file @
d9e51dc
{
"name"
:
"ldy/payment"
,
"type"
:
"library"
,
"version"
:
"3.6.
5
"
,
"version"
:
"3.6.
6
"
,
"description"
:
"支付宝支付、微信支付、招商一网通支付、通联支付、米付支付、利楚扫呗、富友支付、联拓付、易生支付、银盛支付、微诺付、汇收钱 php SDK。"
,
"keywords"
:
[
"alipay"
,
"weixin"
,
"支付宝支付"
,
"微信支付"
,
"通联支付"
,
"集成支付接口SDK"
,
"招商一网通"
,
"一网通"
,
"利楚扫呗"
,
"富友支付"
,
"微诺付"
,
"汇收钱"
],
"homepage"
:
""
,
...
...
examples/wx/wapCharge.php
View file @
d9e51dc
...
...
@@ -20,20 +20,19 @@ $wxConfig = require_once __DIR__ . '/../wxconfig.php';
$orderNo
=
time
()
.
rand
(
1000
,
9999
);
// 订单信息
$payData
=
[
'body'
=>
'test body'
,
'subject'
=>
'test subject'
,
'order_no'
=>
$orderNo
,
'body'
=>
'test body'
,
'subject'
=>
'test subject'
,
'order_no'
=>
$orderNo
,
'timeout_express'
=>
time
()
+
600
,
// 表示必须 600s 内付款
'amount'
=>
'3.01'
,
// 微信沙箱模式,需要金额固定为3.01
'amount'
=>
'3.01'
,
// 微信沙箱模式,需要金额固定为3.01
'return_param'
=>
'123'
,
'client_ip'
=>
isset
(
$_SERVER
[
'REMOTE_ADDR'
])
?
$_SERVER
[
'REMOTE_ADDR'
]
:
'127.0.0.1'
,
// 客户地址
//{"h5_info": {"type":"Wap","wap_url": "https://pay.qq.com","wap_name": "腾讯充值"}}
'scene_info'
=>
[
'payer_client_ip'
=>
isset
(
$_SERVER
[
'REMOTE_ADDR'
])
?
$_SERVER
[
'REMOTE_ADDR'
]
:
'127.0.0.1'
,
// 客户地址,
'h5_info'
=>
[
'type'
=>
'Wap'
//// IOS Android Wap 腾讯建议 IOS ANDROID 采用app支付
]
'type'
=>
'Wap'
,
// IOS Android Wap 腾讯建议 IOS ANDROID 采用app支付
'wap_url'
=>
'helei112g.github.io'
,
//自己的 wap 地址
'wap_name'
=>
'测试充值'
,
],
];
...
...
src/Common/Weixin/Data/Charge/WapChargeData.php
View file @
d9e51dc
...
...
@@ -49,20 +49,15 @@ class WapChargeData extends ChargeBaseData
'attach'
=>
trim
(
$this
->
return_param
),
'scene_info'
=>
json_encode
(
$sceneInfo
),
// 'sign_type' => $this->signType,
// 'fee_type' => $this->feeType,
// 'trade_type' => $this->tradeType, //设置APP支付
// 'limit_pay' => $this->limitPay, // 指定不使用信用卡
// 业务数据
// 'device_info' => $this->terminal_id,
//'detail' => json_encode($this->body, JSON_UNESCAPED_UNICODE);
// 'spbill_create_ip' => trim($this->client_ip),
// 'time_start' => $this->timeStart,
'sign_type'
=>
$this
->
signType
,
'fee_type'
=>
$this
->
feeType
,
'trade_type'
=>
$this
->
tradeType
,
//设置APP支付
'limit_pay'
=>
$this
->
limitPay
,
// 指定不使用信用卡
// 业务数据
'device_info'
=>
$this
->
terminal_id
,
'detail'
=>
json_encode
(
$this
->
body
,
JSON_UNESCAPED_UNICODE
),
'spbill_create_ip'
=>
trim
(
$this
->
client_ip
),
'time_start'
=>
$this
->
timeStart
,
];
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment