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 35b70721
authored
Nov 26, 2020
by
yeran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the bug of wxRefund in service mode
1 parent
5764febc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
6 deletions
composer.json
src/Common/Weixin/Data/Charge/PubChargeData.php
src/Common/Weixin/Data/RefundData.php
src/Refund/WxRefund.php
composer.json
View file @
35b7072
{
{
"name"
:
"ldy/payment"
,
"name"
:
"ldy/payment"
,
"type"
:
"library"
,
"type"
:
"library"
,
"version"
:
"3.3.
8
"
,
"version"
:
"3.3.
9
"
,
"description"
:
"支付宝支付、微信支付、招商一网通支付、通联支付、米付支付、利楚扫呗、富友支付 php SDK。"
,
"description"
:
"支付宝支付、微信支付、招商一网通支付、通联支付、米付支付、利楚扫呗、富友支付 php SDK。"
,
"keywords"
:
[
"alipay"
,
"weixin"
,
"支付宝支付"
,
"微信支付"
,
"通联支付"
,
"集成支付接口SDK"
,
"招商一网通"
,
"一网通"
,
"利楚扫呗"
,
"富友支付"
],
"keywords"
:
[
"alipay"
,
"weixin"
,
"支付宝支付"
,
"微信支付"
,
"通联支付"
,
"集成支付接口SDK"
,
"招商一网通"
,
"一网通"
,
"利楚扫呗"
,
"富友支付"
],
"homepage"
:
""
,
"homepage"
:
""
,
...
...
src/Common/Weixin/Data/Charge/PubChargeData.php
View file @
35b7072
...
@@ -16,8 +16,6 @@ use Payment\Utils\ArrayUtil;
...
@@ -16,8 +16,6 @@ use Payment\Utils\ArrayUtil;
* 微信公众号支付
* 微信公众号支付
*
*
* @property string $openid trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识
* @property string $openid trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识
* @property string $sub_appid 微信分配的子商户公众账号ID
* @property string $sub_mch_id 微信支付分配的子商户号
* @property string $sub_openid 用户在子商户appid下的唯一标识
* @property string $sub_openid 用户在子商户appid下的唯一标识
*
*
* @package Payment\Common\Weixin\Data\Charge
* @package Payment\Common\Weixin\Data\Charge
...
...
src/Common/Weixin/Data/RefundData.php
View file @
35b7072
...
@@ -43,6 +43,10 @@ class RefundData extends WxBaseData
...
@@ -43,6 +43,10 @@ class RefundData extends WxBaseData
'refund_fee'
=>
$this
->
refund_fee
,
// 退款总金额
'refund_fee'
=>
$this
->
refund_fee
,
// 退款总金额
'op_user_id'
=>
$this
->
operator_id
,
//操作员帐号, 默认为商户号
'op_user_id'
=>
$this
->
operator_id
,
//操作员帐号, 默认为商户号
'refund_account'
=>
$this
->
refund_account
,
// 退款账户类型
'refund_account'
=>
$this
->
refund_account
,
// 退款账户类型
// 服务商模式
'sub_appid'
=>
$this
->
sub_appid
,
'sub_mch_id'
=>
$this
->
sub_mch_id
,
];
];
$this
->
retData
=
ArrayUtil
::
paraFilter
(
$this
->
retData
);
$this
->
retData
=
ArrayUtil
::
paraFilter
(
$this
->
retData
);
...
@@ -51,6 +55,7 @@ class RefundData extends WxBaseData
...
@@ -51,6 +55,7 @@ class RefundData extends WxBaseData
/**
/**
* 检查参数
* 检查参数
*
*
* @throws PayException
*/
*/
protected
function
checkDataParam
()
protected
function
checkDataParam
()
{
{
...
...
src/Refund/WxRefund.php
View file @
35b7072
...
@@ -93,7 +93,7 @@ class WxRefund extends WxBaseStrategy
...
@@ -93,7 +93,7 @@ class WxRefund extends WxBaseStrategy
// 将订单退款金额处理为元
// 将订单退款金额处理为元
$refund_fee
=
bcdiv
(
$data
[
'refund_fee'
],
100
,
2
);
$refund_fee
=
bcdiv
(
$data
[
'refund_fee'
],
100
,
2
);
$retData
=
[
return
[
'is_success'
=>
'T'
,
'is_success'
=>
'T'
,
'response'
=>
[
'response'
=>
[
'transaction_id'
=>
$data
[
'transaction_id'
],
'transaction_id'
=>
$data
[
'transaction_id'
],
...
@@ -111,8 +111,6 @@ class WxRefund extends WxBaseStrategy
...
@@ -111,8 +111,6 @@ class WxRefund extends WxBaseStrategy
'cash_refund_fee'
=>
bcdiv
(
$data
[
'cash_refund_fee'
],
100
,
2
),
'cash_refund_fee'
=>
bcdiv
(
$data
[
'cash_refund_fee'
],
100
,
2
),
],
],
];
];
return
$retData
;
}
}
/**
/**
...
...
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