@Service public class WxPayServiceImpl extends Object implements WxPayService
| 构造器和说明 |
|---|
WxPayServiceImpl(WeChatProperties weChatProperties,
WxPayRestTemplateBuilder wxPayRestTemplateBuilder) |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,String> |
authCodeToOpenid(WxPayAuthCodeToOpenIdRequest authCodeToOpenIdRequest)
作用:授权码查询OPENID接口
场景:刷卡支付 |
Map<String,String> |
authCodeToOpenid(WxPayAuthCodeToOpenIdRequest authCodeToOpenIdRequest,
int timeout)
作用:授权码查询OPENID接口
场景:刷卡支付 |
Map<String,String> |
closeOrder(WxPayCloseOrderRequest closeOrderRequest)
作用:关闭订单
场景:公共号支付、扫码支付、APP支付 |
Map<String,String> |
closeOrder(WxPayCloseOrderRequest closeOrderRequest,
int timeout)
作用:关闭订单
场景:公共号支付、扫码支付、APP支付 |
Map<String,String> |
downloadBill(WxPayDownloadBillRequest downloadBillRequest)
作用:对账单下载(成功时返回对账单数据,失败时返回XML格式数据)
场景:刷卡支付、公共号支付、扫码支付、APP支付 |
Map<String,String> |
downloadBill(WxPayDownloadBillRequest downloadBillRequest,
int timeout)
作用:对账单下载
场景:刷卡支付、公共号支付、扫码支付、APP支付 其他:无论是否成功都返回Map。 |
Map<String,String> |
fillRequestData(Map<String,String> reqData)
向 Map 中添加 appid、mch_id、nonce_str、sign_type、sign
该函数适用于商户适用于统一下单等接口,不适用于红包、代金券接口 |
boolean |
isResponseSignatureValid(Map<String,String> reqData)
判断xml数据的sign是否有效,必须包含sign字段,否则返回false。
|
Map<String,String> |
microPay(WxPayMicroPayRequest microPayRequest)
作用:提交刷卡支付
场景:刷卡支付 |
Map<String,String> |
microPay(WxPayMicroPayRequest microPayRequest,
int timeout)
作用:提交刷卡支付
场景:刷卡支付 |
Map<String,String> |
orderQuery(WXPayOrderQueryRequest orderQueryRequest)
作用:查询订单
场景:刷卡支付、公共号支付、扫码支付、APP支付 |
Map<String,String> |
orderQuery(WXPayOrderQueryRequest orderQueryRequest,
int timeout)
作用:查询订单
场景:刷卡支付、公共号支付、扫码支付、APP支付 |
Map<String,String> |
processResponseXml(String xmlStr)
处理 HTTPS API返回数据,转换成Map对象。
|
Map<String,String> |
refund(WxPayRefundRequest refundRequest)
作用:申请退款
场景:刷卡支付、公共号支付、扫码支付、APP支付 |
Map<String,String> |
refund(WxPayRefundRequest refundRequest,
int timeout)
作用:申请退款
场景:刷卡支付、公共号支付、扫码支付、APP支付 其他:需要证书 |
Map<String,String> |
refundQuery(WxPayRefundQueryRequest refundQueryRequest)
作用:退款查询
场景:刷卡支付、公共号支付、扫码支付、APP支付 |
Map<String,String> |
refundQuery(WxPayRefundQueryRequest refundQueryRequest,
int timeout)
作用:退款查询
场景:刷卡支付、公共号支付、扫码支付、APP支付 |
Map<String,String> |
report(WxPayReportRequest reportRequest)
作用:交易保障
场景:刷卡支付、公共号支付、扫码支付、APP支付 |
Map<String,String> |
report(WxPayReportRequest reportRequest,
int timeout)
作用:交易保障
场景:刷卡支付、公共号支付、扫码支付、APP支付 |
Map<String,String> |
reverse(WxPayReverseRequest payReverseRequest)
作用:撤销订单
场景:刷卡支付 |
Map<String,String> |
reverse(WxPayReverseRequest payReverseRequest,
int timeout)
作用:撤销订单
场景:刷卡支付 其他:需要证书 |
Map<String,String> |
shortUrl(WxPayShortUrlRequest shortUrlRequest)
作用:转换短链接
场景:刷卡支付、扫码支付 |
Map<String,String> |
shortUrl(WxPayShortUrlRequest shortUrlRequest,
int timeout)
作用:转换短链接
场景:刷卡支付、扫码支付 |
Map<String,String> |
unifiedOrder(WxPayUnifiedOrderRequest unifiedOrderRequest)
作用:统一下单
场景:公共号支付、扫码支付、APP支付 |
Map<String,String> |
unifiedOrder(WxPayUnifiedOrderRequest unifiedOrderRequest,
int timeout)
作用:统一下单
场景:公共号支付、扫码支付、APP支付 |
public WxPayServiceImpl(WeChatProperties weChatProperties, WxPayRestTemplateBuilder wxPayRestTemplateBuilder)
public Map<String,String> microPay(WxPayMicroPayRequest microPayRequest) throws Exception
microPay 在接口中 WxPayServicemicroPayRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> microPay(WxPayMicroPayRequest microPayRequest, int timeout) throws Exception
microPay 在接口中 WxPayServicemicroPayRequest - 向wxpay post的请求数据timeout - 超时时间Exception - 异常public Map<String,String> unifiedOrder(WxPayUnifiedOrderRequest unifiedOrderRequest) throws Exception
unifiedOrder 在接口中 WxPayServiceunifiedOrderRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> unifiedOrder(WxPayUnifiedOrderRequest unifiedOrderRequest, int timeout) throws Exception
unifiedOrder 在接口中 WxPayServiceunifiedOrderRequest - 向wxpay post的请求数据timeout - 超时时间Exception - 异常public Map<String,String> orderQuery(WXPayOrderQueryRequest orderQueryRequest) throws Exception
orderQuery 在接口中 WxPayServiceorderQueryRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> orderQuery(WXPayOrderQueryRequest orderQueryRequest, int timeout) throws Exception
orderQuery 在接口中 WxPayServiceorderQueryRequest - 向wxpay post的请求数据 inttimeout - 超时时间Exception - 异常public Map<String,String> reverse(WxPayReverseRequest payReverseRequest) throws Exception
reverse 在接口中 WxPayServicepayReverseRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> reverse(WxPayReverseRequest payReverseRequest, int timeout) throws Exception
reverse 在接口中 WxPayServicepayReverseRequest - 向wxpay post的请求数据timeout - 超时时间Exception - 异常public Map<String,String> closeOrder(WxPayCloseOrderRequest closeOrderRequest) throws Exception
closeOrder 在接口中 WxPayServicecloseOrderRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> closeOrder(WxPayCloseOrderRequest closeOrderRequest, int timeout) throws Exception
closeOrder 在接口中 WxPayServicecloseOrderRequest - 向wxpay post的请求数据timeout - 超时时间Exception - 异常public Map<String,String> refund(WxPayRefundRequest refundRequest) throws Exception
refund 在接口中 WxPayServicerefundRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> refund(WxPayRefundRequest refundRequest, int timeout) throws Exception
refund 在接口中 WxPayServicerefundRequest - 向wxpay post的请求数据timeout - 超时时间Exception - 异常public Map<String,String> refundQuery(WxPayRefundQueryRequest refundQueryRequest) throws Exception
refundQuery 在接口中 WxPayServicerefundQueryRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> refundQuery(WxPayRefundQueryRequest refundQueryRequest, int timeout) throws Exception
refundQuery 在接口中 WxPayServicerefundQueryRequest - 向wxpay post的请求数据timeout - 超时时间Exception - 异常public Map<String,String> downloadBill(WxPayDownloadBillRequest downloadBillRequest) throws Exception
downloadBill 在接口中 WxPayServicedownloadBillRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> downloadBill(WxPayDownloadBillRequest downloadBillRequest, int timeout) throws Exception
downloadBill 在接口中 WxPayServicedownloadBillRequest - 向wxpay post的请求数据timeout - 超时时间Exception - 异常public Map<String,String> report(WxPayReportRequest reportRequest) throws Exception
report 在接口中 WxPayServicereportRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> report(WxPayReportRequest reportRequest, int timeout) throws Exception
report 在接口中 WxPayServicereportRequest - 向wxpay post的请求数据timeout - 超时时间Exception - 异常public Map<String,String> shortUrl(WxPayShortUrlRequest shortUrlRequest) throws Exception
shortUrl 在接口中 WxPayServiceshortUrlRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> shortUrl(WxPayShortUrlRequest shortUrlRequest, int timeout) throws Exception
shortUrl 在接口中 WxPayServiceshortUrlRequest - 向wxpay post的请求数据timeout - 超时时间Exception - 异常public Map<String,String> authCodeToOpenid(WxPayAuthCodeToOpenIdRequest authCodeToOpenIdRequest) throws Exception
authCodeToOpenid 在接口中 WxPayServiceauthCodeToOpenIdRequest - 向wxpay post的请求数据Exception - 异常public Map<String,String> authCodeToOpenid(WxPayAuthCodeToOpenIdRequest authCodeToOpenIdRequest, int timeout) throws Exception
authCodeToOpenid 在接口中 WxPayServiceauthCodeToOpenIdRequest - 向wxpay post的请求数据timeout - 超时时间Exception - 异常public Map<String,String> fillRequestData(Map<String,String> reqData) throws Exception
reqData - 请求数据Exception - 异常public Map<String,String> processResponseXml(String xmlStr) throws Exception
xmlStr - API返回的XML格式数据Exception - 异常Copyright © 2019. All rights reserved.