pay
这里介绍一下 pay 的使用。
功能介绍
主要包含在 wmeimob-spring-boot-starter-pay
jar 中。
支持的平台有:
引入公共依赖:
xml
<dependency>
<groupId>com.wmeimob.fastboot</groupId>
<artifactId>wmeimob-spring-boot-starter-pay</artifactId>
</dependency>
支付宝
再引入支付宝依赖:
xml
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
</dependency>
填写支付宝对应的配置项:
yml
wmeimob:
alipay:
pay:
url: xxx
appid: xxx
service: xxxx
aliPayNotify: xxx
... # 等等参数
具体参见 `AlipayProperties` 类
微信支付
再引入微信支付依赖:
xml
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-pay</artifactId>
</dependency>
如果微信支付使用了 WxPayServiceJoddHttpImpl 实例,则需要在引入:
xml
<dependency>
<groupId>org.jodd</groupId>
<artifactId>jodd-http</artifactId>
</dependency>
填写微信支付对应的配置项:
yml
wmeimob:
wx:
pay:
appId: xxx
mchId: xxxx
mchKey: xxx
... # 等等参数
具体参见 `WxPayProperties` 类,证书相关配置项,增加了 String 结尾的几个属性,这个可以用在容器环境,详见 k8s 高级用法。