Merge pull request #142 from sutra/refund

Update javadoc of WeChat payment refunding, to align with the WeChat official document.
This commit is contained in:
jinyu 2018-05-29 11:42:59 +08:00 committed by GitHub
commit 5a21a3db2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 71 deletions

View File

@ -459,15 +459,25 @@ public class PayApi extends MchApi {
/**
* 申请退款(请求需要双向证书)
*
* <p>
* 当交易发生之后一段时间内由于买家或者卖家的原因需要退款时卖家可以通过退款接口将支付款退还给买家微信支付将在收到退款请求并且验证成功之后
* 按照退款规则将支付款按原路退到买家帐号上
* </p>
* <p style="color:red">
* 1.交易时间超过半年的订单无法提交退款
* 2.微信支付退款支持单笔交易分多次退款多次退款需要提交原支付订单的商户订单号和设置不同的退款单号一笔退款失败后重新提交
* 要采用原来的退款单号总退款金额不能超过用户实际支付金额
* </p>
*
* <ol>
* <li>交易时间超过一年的订单无法提交退款</li>
* <li>
* 微信支付退款支持单笔交易分多次退款多次退款需要提交原支付订单的商户订单号和设置不同的退款单号
* 申请退款总金额不能超过订单金额
* <span style="color:red">一笔退款失败后重新提交请不要更换退款单号请使用原商户退款单号</span>
* </li>
* <li>
* 请求频率限制150qps即每秒钟正常的申请退款请求次数不超过150次
* 错误或无效请求频率限制6qps即每秒钟异常或错误的退款申请请求不超过6次
* </li>
* <li>每个支付订单的部分退款次数不能超过50次</li>
* </ol>
*
* @param idQuery
* 商户系统内部的订单号, transaction_id out_trade_no 二选一,如果同时存在优先级:
@ -537,7 +547,7 @@ public class PayApi extends MchApi {
* 商户系统内部的退款单号, 户系统内部唯一,同一退款单号多次请求只退一笔
* @param totalFee
* 订单总金额,单位为元
* @see {@link #applyRefund(IdQuery, String, double, double, CurrencyType, String, String, RefundAccountType)}
* @see #applyRefund(IdQuery, String, double, double, CurrencyType, String, String, RefundAccountType)
*/
public RefundResult applyRefund(IdQuery idQuery, String outRefundNo,
double totalFee) throws WeixinException {

View File

@ -1,6 +1,5 @@
package com.foxinmy.weixin4j.payment;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Date;
import java.util.List;
@ -434,42 +433,7 @@ public class WeixinPayProxy {
}
/**
* 申请退款(请求需要双向证书)</br>
* <p>
* 当交易发生之后一段时间内由于买家或者卖家的原因需要退款时卖家可以通过退款接口将支付款退还给买家微信支付将在收到退款请求并且验证成功之后
* 按照退款规则将支付款按原路退到买家帐号上
* </p>
* <p style="color:red">
* 1.交易时间超过半年的订单无法提交退款
* 2.微信支付退款支持单笔交易分多次退款多次退款需要提交原支付订单的商户订单号和设置不同的退款单号一笔退款失败后重新提交
* 要采用原来的退款单号总退款金额不能超过用户实际支付金额
* </p>
*
* @param idQuery
* 商户系统内部的订单号, transaction_id out_trade_no 二选一,如果同时存在优先级:
* transaction_id> out_trade_no
* @param outRefundNo
* 商户系统内部的退款单号, 户系统内部唯一,同一退款单号多次请求只退一笔
* @param totalFee
* 订单总金额,单位为元
* @param refundFee
* 退款总金额,单位为元,可以做部分退款
* @param refundFeeType
* 货币类型符合ISO 4217标准的三位字母代码默认人民币CNY
* @param opUserId
* 操作员帐号, 默认为商户号
* @param refundDesc
* 退款原因若商户传入会在下发给用户的退款消息中体现退款原因
* @param refundAccountType
* 退款资金来源,默认使用未结算资金退款REFUND_SOURCE_UNSETTLED_FUNDS
* @return 退款申请结果
* @see com.foxinmy.weixin4j.payment.mch.RefundResult
* @see com.foxinmy.weixin4j.api.PayApi
* @see <a href=
* "http://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_4">
* 申请退款API</a>
* @since V3
* @throws WeixinException
* @see PayApi#applyRefund(IdQuery, String, double, double, CurrencyType, String, String, RefundAccountType)
*/
public RefundResult applyRefund(IdQuery idQuery, String outRefundNo,
double totalFee, double refundFee, CurrencyType refundFeeType,
@ -480,11 +444,7 @@ public class WeixinPayProxy {
}
/**
* 退款申请(全额退款)
*
* @throws IOException
*
* @see {@link #applyRefund(IdQuery, String, double, double, String,CurrencyType)}
* @see PayApi#applyRefund(IdQuery, String, double)
*/
public RefundResult applyRefund(IdQuery idQuery, String outRefundNo,
double totalFee) throws WeixinException {

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>weixin4j-serverX</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>