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 a70fca30
authored
Jul 01, 2019
by
wangyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除测试数据
1 parent
e16776d5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
5 deletions
examples/fu/chargeQuery.php
examples/fu/common.php
examples/fu/pubCharge.php
examples/fu/scanCharge.php
examples/fu/chargeQuery.php
View file @
a70fca3
...
...
@@ -11,7 +11,7 @@ use Payment\Config;
$payData
=
[
'order_type'
=>
'WECHAT'
,
//ALIPAY、UNIONPAY、BESTPAY
'order_no'
=>
'
2019062017530653068450564957
'
,
//商户订单号
'order_no'
=>
''
,
//商户订单号
];
try
{
$ret
=
Query
::
run
(
Config
::
FU_CHARGE
,
$config
,
$payData
);
...
...
examples/fu/common.php
View file @
a70fca3
...
...
@@ -4,7 +4,7 @@ $config = [
'ins_cd'
=>
'08A9999999'
,
//机构号
'mchnt_cd'
=>
'0002900F0370542'
,
//商户号
'term_id'
=>
'88888888'
,
//终端号
'sub_appid'
=>
'
wx24863377e74518f8
'
,
//子商户appid
'sub_appid'
=>
''
,
//子商户appid
'private_key'
=>
'-----BEGIN RSA PRIVATE KEY-----
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJgAzD8fEvBHQTyxUEeK963mjziM
WG7nxpi+pDMdtWiakc6xVhhbaipLaHo4wVI92A2wr3ptGQ1/YsASEHm3m2wGOpT2vrb2Ln/S7lz1
...
...
@@ -19,7 +19,7 @@ vusbRwH3/38ET7udBdVdE6poga1Z0al+0njMwVypnNwy+eLWhkhrWmpLh3OjfQJAI3BV8JS6xzKh
DNo+tkHVXLY9H2kdWFoYTvuLexHAgrsnHxONOlSA5hcVLd1B3p9utOt3QeDf6x2i1lqhTH2w8gzj
vsnx13tWqg==
-----END RSA PRIVATE KEY-----'
,
//RSA私钥
'notify_url'
=>
'
http://www.ledian.com/payments/notify
'
,
//通知地址
'notify_url'
=>
''
,
//通知地址
'use_sandbox'
=>
false
,
'return_raw'
=>
false
];
...
...
@@ -154,5 +154,5 @@ function trade_no($custom = null, $simple = false)
return
date
(
'YmdHis'
)
.
$usec
.
$str
.
$custom
;
}
$str
=
substr
(
implode
(
NULL
,
array_map
(
'ord'
,
str_split
(
substr
(
uniqid
(),
7
,
13
),
1
))),
0
,
8
);
return
date
(
'YmdHis'
)
.
$usec
.
$str
;
return
$usec
.
$str
.
(
$custom
??
''
)
;
}
\ No newline at end of file
examples/fu/pubCharge.php
0 → 100644
View file @
a70fca3
<?php
date_default_timezone_set
(
'Asia/Shanghai'
);
require_once
__DIR__
.
'/../../autoload.php'
;
require_once
__DIR__
.
'/common.php'
;
use
Payment\Common\PayException
;
use
Payment\Client\Charge
;
use
Payment\Config
;
$payData
=
[
'trade_type'
=>
'JSAPI'
,
'order_no'
=>
trade_no
(
20
,
true
),
'amount'
=>
1
,
'subject'
=>
'支付测试'
,
'openid'
=>
'oUlAM0Wp1K1rJEGJ0t__Ls5-qFKE'
,
'attach'
=>
'10054c238f670a2e9649a8b100f20562'
];
var_dump
(
$payData
);
try
{
$ret
=
Charge
::
run
(
Config
::
FU_CHANNEL_PUB
,
$config
,
$payData
);
}
catch
(
PayException
$e
)
{
echo
$e
->
errorMessage
();
exit
;
}
echo
json_encode
(
$ret
,
JSON_UNESCAPED_UNICODE
);
\ No newline at end of file
examples/fu/scanCharge.php
View file @
a70fca3
...
...
@@ -17,7 +17,7 @@ $payData = [
'attach'
=>
'10054c238f670a2e9649a8b100f20562'
];
$config
[
'notify_url'
]
=
'
http://api.hotel.ledianyun.com/api/index/test
'
;
$config
[
'notify_url'
]
=
''
;
try
{
$ret
=
Charge
::
run
(
Config
::
FU_CHANNEL_SCAN
,
$config
,
$payData
);
...
...
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