public class Topay extends Object implements Serializable
| Constructor and Description |
|---|
Topay(WechatConfig wechatConfig) |
| Modifier and Type | Method and Description |
|---|---|
Map |
getPackage(String orderItemName,
String orderNo,
double price,
String notifyUrl,
String tradeType,
String ip,
String openId,
String attach)
微信支付下单
|
Map |
getPackage(String orderItemName,
String orderNo,
double price,
String notifyUrl,
String tradeType,
String ip,
String openId,
String attach,
String productionId)
微信支付下单
|
void |
init() |
WechatNotifyVO |
notify(javax.servlet.http.HttpServletRequest request)
微信回调
|
WechatNotifyVO |
notify(String weChatAsyncXML)
微信回调
|
String |
refund(String transactionId,
String outTradeNo,
String refundTransactionId,
double totalFee,
double refundFee,
String notifyUrl)
微信退款
|
String |
toString() |
@Autowired public Topay(WechatConfig wechatConfig)
@PostConstruct public void init()
public Map getPackage(String orderItemName, String orderNo, double price, String notifyUrl, String tradeType, String ip, String openId, String attach) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException, org.hiylo.components.exceptions.PaymentException
orderItemName - 微信订单商品名称orderNo - 业务订单编号price - 订单价格 (没有乘100)notifyUrl - 回调地址tradeType - 交易类型 NATIVE 扫码支付 JSAPI 微信公众号 微信小程序 网页支付 APP App支付ip - 请求的IP可以随便填openId - 用户的openId, 某些情况可以忽略attach - 附加信息, 回调时会原样传回NoSuchAlgorithmException - 签名异常InvalidKeyException - 签名异常UnsupportedEncodingException - 签名异常org.hiylo.components.exceptions.PaymentException - 支付异常public Map getPackage(String orderItemName, String orderNo, double price, String notifyUrl, String tradeType, String ip, String openId, String attach, String productionId) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException, org.hiylo.components.exceptions.PaymentException
orderItemName - 微信订单商品名称orderNo - 业务订单编号price - 订单价格 (没有乘100)notifyUrl - 回调地址tradeType - 交易类型 NATIVE 扫码支付 JSAPI 微信公众号 微信小程序 网页支付 APP App支付ip - 请求的IP可以随便填openId - 用户的openId, 某些情况可以忽略attach - 附加信息, 回调时会原样传回productionId - 商品编号, 某些情况可以忽略, 忽略可以调用上面的方法NoSuchAlgorithmException - 签名异常InvalidKeyException - 签名异常UnsupportedEncodingException - 签名异常org.hiylo.components.exceptions.PaymentException - 支付异常public String refund(String transactionId, String outTradeNo, String refundTransactionId, double totalFee, double refundFee, String notifyUrl) throws org.hiylo.components.exceptions.PaymentException
transactionId - 微信訂單號outTradeNo - 咱们给微信提交的订单编号refundTransactionId - 咱们退款表里面的idtotalFee - 订单总金额refundFee - 退款金额notifyUrl - 异步通知地址org.hiylo.components.exceptions.PaymentExceptionpublic WechatNotifyVO notify(javax.servlet.http.HttpServletRequest request) throws IOException
request - 回调时的请求IOExceptionpublic WechatNotifyVO notify(String weChatAsyncXML)
weChatAsyncXML - 微信回调内容Copyright © 2021 Clouds Studio. All rights reserved.