@Component public class WechatPay extends Object
| 构造器和说明 |
|---|
WechatPay() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getOpenId(String code)
用户登录:用code换用户OpenId
|
private String |
getOpenIdUrl(String code)
封装获取opernId的url
|
OrderNotice |
handleOrderNotice(OrderNotice notice)
付款流程:处理支付成功通知
|
PaymentParam |
handlePaymentParam(OutOrderForm outOrderForm)
付款流程:生成小程序调起支付API所需参数
|
RefundCreateReturn |
handleRefund(OutRefundForm outRefundForm)
退款流程:发起退款并获得退款结果
|
RefundNotice |
handleRefundNotice(RefundNotice notice)
退款流程 :处理退款通知
|
void |
init() |
private OrderCreateJsapi |
orderCreate(OutOrderForm outOrderForm)
封装原始下单信息(JSAPI下单所需信息)
|
private RefundCreate |
refundCreate(OutRefundForm outRefundForm)
生成退款信息
|
public static WechatPay wechatPay
@PostConstruct public void init()
public PaymentParam handlePaymentParam(OutOrderForm outOrderForm) throws Exception
outOrderForm - 商户订单Exceptionpublic OrderNotice handleOrderNotice(OrderNotice notice)
notice - 微信发起的通知public RefundCreateReturn handleRefund(OutRefundForm outRefundForm)
outRefundForm - 商户退款单public RefundNotice handleRefundNotice(RefundNotice notice)
notice - private OrderCreateJsapi orderCreate(OutOrderForm outOrderForm)
outOrderForm - 商户订单private RefundCreate refundCreate(OutRefundForm outRefundForm)
outRefundForm - 退款信息Copyright © 2022. All rights reserved.