public class AlipayCore extends Object
AlipayCore.ClientBuilder clientBuilderclientBuilder = new AlipayCore.ClientBuilder();
AlipayCore alipayCore = .setAlipayPublicKey("xxx").setAppId("xxx").setPrivateKey("xxx").build();
AlipayClient.pay(request,alipayCore);
AlipayClient.refund(request,alipayCore);
AlipayClient.preCreate(request,alipayCore);
AlipayClient.query("out_trade_no",alipayCore);
AlipayClient.payInMobileSite(request,alipayCore);
| 限定符和类型 | 类和说明 |
|---|---|
static class |
AlipayCore.ClientBuilder
参数构件Class,参数构件第一步,请完成所有参数设置后调用build 方法.
|
| 限定符和类型 | 方法和说明 |
|---|---|
AlipayCancelResponse |
cancel(String outTradeNo)
撤销订单
|
AlipayTradeResponse |
pay(AlipayTradeRequest request)
当面付.条码支付,是支付宝给到线下传统行业的一种收款方式。
|
String |
payInMobileSite(AlipayMobileSiteRequest request)
支付宝手机网页支付,支付宝新接口,在手机上可直接调用支付宝APP完成支付宝(有安装支付宝APP情况)
|
String |
payInWebSite(AlipayWebSiteRequest request)
支付宝电脑网站支付,该操作会跳转到支付宝的支付页面中完成支付动作,以 异步/同步 的形式告知支付结果
|
AlipayQrcodeResponse |
preCreate(AlipayQrcodeRequest request)
当面付.扫码支付,指用户打开支付宝钱包中的“扫一扫”功能,扫描商户针对每个订单实时生成的订单二维码,并在手机端确认支付。
|
AlipayQueryResponse |
query(String outTradeNo)
查询支付订单.
|
AlipayRefundResponse |
refund(AlipayRefundRequest request)
支付宝退款,商户因业务原因需要退款时,可通过成功交易的商户订单号或支付宝交易号进行退款 ,支持部分退款。
|
public String payInMobileSite(AlipayMobileSiteRequest request) throws Exception
request - the request 新版网页支付参数Exception - the exceptionpublic String payInWebSite(AlipayWebSiteRequest request) throws Exception
request - 支付参数对象Exception - 程序异常public AlipayQrcodeResponse preCreate(AlipayQrcodeRequest request) throws Exception
request - the request 扫码支付所需参数Exception - the exceptionpublic AlipayTradeResponse pay(AlipayTradeRequest request) throws Exception
request - the request 条码支付 所需参数Exception - the exceptionpublic AlipayQueryResponse query(String outTradeNo) throws Exception
outTradeNo - the out trade noException - the exceptionpublic AlipayRefundResponse refund(AlipayRefundRequest request) throws Exception
request - the request 退款参数Exception - the exceptionpublic AlipayCancelResponse cancel(String outTradeNo) throws Exception
outTradeNo - the out trade noException - the exceptionCopyright © 2018. All rights reserved.