Commit 35b70721 by yeran

fix the bug of wxRefund in service mode

1 parent 5764febc
{
"name": "ldy/payment",
"type": "library",
"version": "3.3.8",
"version": "3.3.9",
"description": "支付宝支付、微信支付、招商一网通支付、通联支付、米付支付、利楚扫呗、富友支付 php SDK。",
"keywords": ["alipay", "weixin", "支付宝支付", "微信支付","通联支付", "集成支付接口SDK", "招商一网通", "一网通", "利楚扫呗", "富友支付"],
"homepage": "",
......
......@@ -16,8 +16,6 @@ use Payment\Utils\ArrayUtil;
* 微信公众号支付
*
* @property string $openid trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识
* @property string $sub_appid 微信分配的子商户公众账号ID
* @property string $sub_mch_id 微信支付分配的子商户号
* @property string $sub_openid 用户在子商户appid下的唯一标识
*
* @package Payment\Common\Weixin\Data\Charge
......
......@@ -43,6 +43,10 @@ class RefundData extends WxBaseData
'refund_fee' => $this->refund_fee,// 退款总金额
'op_user_id' => $this->operator_id,//操作员帐号, 默认为商户号
'refund_account' => $this->refund_account,// 退款账户类型
// 服务商模式
'sub_appid' => $this->sub_appid,
'sub_mch_id' => $this->sub_mch_id,
];
$this->retData = ArrayUtil::paraFilter($this->retData);
......@@ -51,6 +55,7 @@ class RefundData extends WxBaseData
/**
* 检查参数
*
* @throws PayException
*/
protected function checkDataParam()
{
......
......@@ -93,7 +93,7 @@ class WxRefund extends WxBaseStrategy
// 将订单退款金额处理为元
$refund_fee = bcdiv($data['refund_fee'], 100, 2);
$retData = [
return [
'is_success' => 'T',
'response' => [
'transaction_id' => $data['transaction_id'],
......@@ -111,8 +111,6 @@ class WxRefund extends WxBaseStrategy
'cash_refund_fee' => bcdiv($data['cash_refund_fee'], 100, 2),
],
];
return $retData;
}
/**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!