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 8a2b761c
authored
Jul 24, 2019
by
wangyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
1 parent
389be2d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
src/Common/Sw/Data/Charge/PubChargeData.php
src/Common/Sw/Data/Charge/PubChargeData.php
View file @
8a2b761
<?php
/**
* Created by PhpStorm.
*
*
* Date: 16/7/31
* Time: 上午9:20
*/
...
...
@@ -28,7 +28,7 @@ class PubChargeData extends ChargeBaseData
// 公众号支付,必须设置openid
$payType
=
$this
->
pay_type
;
//010微信,020支付宝,060qq钱包,090口碑,100翼支付
if
((
$payType
==
'010'
||
$payType
==
'020'
))
{
if
(
empty
(
$this
->
open
id
))
if
(
empty
(
$this
->
open_
id
))
throw
new
PayException
(
'用户在商户appid下的唯一标识,用户标识(微信openid,支付宝userid),pay_type为010及020时需要传入.'
);
}
...
...
@@ -39,37 +39,37 @@ class PubChargeData extends ChargeBaseData
{
$this
->
certainSignData
=
[
// 基本数据
'pay_ver'
=>
trim
(
$this
->
pay_ver
),
'pay_type'
=>
trim
(
$this
->
pay_type
),
'service_id'
=>
$this
->
service_id
,
'merchant_no'
=>
$this
->
merchant_no
,
'terminal_id'
=>
$this
->
terminal_id
,
'terminal_trace'
=>
$this
->
terminal_trace
,
'pay_ver'
=>
trim
(
$this
->
pay_ver
),
'pay_type'
=>
trim
(
$this
->
pay_type
),
'service_id'
=>
$this
->
service_id
,
'merchant_no'
=>
$this
->
merchant_no
,
'terminal_id'
=>
$this
->
terminal_id
,
'terminal_trace'
=>
$this
->
terminal_trace
,
'terminal_time'
=>
$this
->
terminal_time
,
'total_fee'
=>
$this
->
total_fee
,
// 金额,单位分
'total_fee'
=>
$this
->
total_fee
,
// 金额,单位分
// 'time_expire' => $this->timeout_express,
];
$signData
=
array_merge
(
$this
->
certainSignData
,[]);
$signData
=
array_merge
(
$this
->
certainSignData
,
[]);
if
(
isset
(
$this
->
sub_appid
))
{
if
(
isset
(
$this
->
sub_appid
))
{
$signData
[
'sub_appid'
]
=
$this
->
sub_appid
;
}
if
(
isset
(
$this
->
open_id
))
{
$signData
[
'open_id'
]
=
$this
->
open_id
;
if
(
isset
(
$this
->
open_id
))
{
$signData
[
'open_id'
]
=
$this
->
open_id
;
}
if
(
isset
(
$this
->
order_body
))
{
if
(
isset
(
$this
->
order_body
))
{
$signData
[
'order_body'
]
=
$this
->
order_body
;
}
if
(
isset
(
$this
->
notify_url
))
{
$signData
[
'notify_url'
]
=
$this
->
notify_url
;
if
(
isset
(
$this
->
notify_url
))
{
$signData
[
'notify_url'
]
=
$this
->
notify_url
;
}
if
(
isset
(
$this
->
attach
))
{
$signData
[
'attach'
]
=
$this
->
attach
;
if
(
isset
(
$this
->
attach
))
{
$signData
[
'attach'
]
=
$this
->
attach
;
}
if
(
isset
(
$this
->
goods_detail
))
{
$signData
[
'goods_detail'
]
=
$this
->
goods_detail
;
if
(
isset
(
$this
->
goods_detail
))
{
$signData
[
'goods_detail'
]
=
$this
->
goods_detail
;
//goods_Id String N 商品编号
//goods_name String N 商品名称
...
...
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