Fetch the repository succeeded.
This action will force synchronization from thlws/payment-wechat, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
基于Java实现的 微信支付 依赖库。
【微信、支付宝、翼支付 三合一】 https://gitee.com/thlws/payment-thl
只支持Java平台,不支持Android App支付;
微信支付 org.thlws.payment.WechatPayClient
方法名称 | 功能说明 |
---|---|
unifiedOrder | 统一下单(类似预订单) |
refund | 申请退款 |
reverse | 支付撤销 |
microPay | 刷卡支付 |
orderQuery | 支付查询 |
closeOrder | 订单关闭 |
openidQuery | 查询OpenId |
queryMicroMch | 查询小微收款人信息 |
postMicroMch | 申请开通小微收款功能 |
微信公众号 org.thlws.payment.WechatMpClient
方法名称 | 功能说明 |
---|---|
obtainOauthAccessToken | 获取accesToken(OAuth2) |
refreshOauthAccessToken | 刷新accesToken(OAuth2) |
isvalidOauthAccessToken | 验证token是否过期(OAuth2) |
generateWechatUrl | 生成微信规则URL |
obtainUserInfo | 获取用户资料 |
obtainAccessToken | 获取accesToken(普通) |
obtainJsApiTicket | 获取JSAPI Ticket |
obtainTemplateId | 获取微信消息模板ID |
setupIndustry | 设置行业属性 |
sendMsgToUser | 发送微信通知 |
<dependency>
<groupId>org.thlws</groupId>
<artifactId>payment-wechat</artifactId>
<version>1.0.5</version>
</dependency>
compile 'org.thlws:payment-wechat:1.0.5'
WechatPayResponse response = WechatPayClient.micropay(request,apiKey);
//flag == true 表示成功
boolean flag = response.isSuccess();
String message = response.getMessage();
System.out.println("isSuccess="+flag+", message="+message);
payment-* 是一系列基于Java实现的支付类库,包含支付宝、微信、翼支付等,其目的是以最简单的方式完成各种支付方式接入。目前支付类库各自独立,使用时需单独引用,详见“支付类库”各自主页说明,后续不排除对所有支付类库整体打包,请留意文档更新。另源码会同时push到gitee&github,可能的话帮忙star下~😍
Sign in for post a comment
Comments ( 0 )