|
@@ -422,8 +422,11 @@ public class WxPayServiceImpl implements IWxPayService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, String> refund(String out_refund_no,String transaction_id, String refund_fee, String total_fee) {
|
|
|
+ public Map<String, String> refund(String out_refund_no,String transaction_id, BigDecimal refund_fee, BigDecimal total_fee) {
|
|
|
WxSmallConfig config = new WxSmallConfig(appid,mchid,key);
|
|
|
+ BigDecimal unit = new BigDecimal(100);
|
|
|
+ refund_fee = refund_fee.multiply(unit);
|
|
|
+ total_fee = total_fee.multiply(unit);
|
|
|
try {
|
|
|
WXPay wxpay = new WXPay(config);
|
|
|
Map<String, String> data = new HashMap<String, String>();
|
|
@@ -431,8 +434,8 @@ public class WxPayServiceImpl implements IWxPayService {
|
|
|
data.put("transaction_id", transaction_id);
|
|
|
data.put("device_info", "");
|
|
|
data.put("fee_type", "CNY");
|
|
|
- data.put("refund_fee", "1");
|
|
|
- data.put("total_fee", "1");
|
|
|
+ data.put("refund_fee", refund_fee.intValue()+"");
|
|
|
+ data.put("total_fee", total_fee.intValue()+"");
|
|
|
Map<String, String> result = new HashMap<>();
|
|
|
result.put("appId",appid);
|
|
|
result.put("nonceStr",WXPayUtil.generateNonceStr());
|