| 程序包 | 说明 |
|---|---|
| com.lehuipay.leona | |
| com.lehuipay.leona.contracts |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Callback.callback(LeonaException e,
T data)
异步http请求callback方法
http status code > 300时, httpClient将responseBody封装为LeonaException
使用LeonaException中方法获取http请求失败的原因, 例如
leonaClient.qrCodePay(req, (e, data) -> {
if (e !
|
| 限定符和类型 | 方法和说明 |
|---|---|
Payment |
LeonaClient.getOrder(GetOrderRequest req)
查询交易
|
void |
LeonaClient.getOrder(GetOrderRequest req,
Callback<Payment> callback)
查询交易(异步)
|
Refund |
LeonaClient.getRefund(GetRefundRequest req)
查询退款
|
void |
LeonaClient.getRefund(GetRefundRequest req,
Callback<Refund> callback)
查询退款(异步)
|
Payment |
LeonaClient.microPay(MicroPayRequest req)
刷卡交易
|
void |
LeonaClient.microPay(MicroPayRequest req,
Callback<Payment> callback)
刷卡交易(异步)
|
QRCodePayResponse |
LeonaClient.qrCodePay(QRCodePayRequest req)
二维码支付
|
void |
LeonaClient.qrCodePay(QRCodePayRequest req,
Callback<QRCodePayResponse> callback)
二维码支付(异步)
|
Refund |
LeonaClient.refund(RefundRequest req)
退款
|
void |
LeonaClient.refund(RefundRequest req,
Callback<Refund> callback)
退款(异步)
|
<T,R> T |
HttpClient.request(String method,
String url,
R data,
Class<T> clazz)
同步http请求
|
| 限定符和类型 | 方法和说明 |
|---|---|
Payment |
Leona.getOrder(GetOrderRequest req) |
void |
Leona.getOrder(GetOrderRequest req,
Callback<Payment> callback) |
Refund |
Leona.getRefund(GetRefundRequest req) |
void |
Leona.getRefund(GetRefundRequest req,
Callback<Refund> callback) |
Payment |
Leona.microPay(MicroPayRequest req) |
void |
Leona.microPay(MicroPayRequest req,
Callback<Payment> callback) |
QRCodePayResponse |
Leona.qrCodePay(QRCodePayRequest req) |
void |
Leona.qrCodePay(QRCodePayRequest req,
Callback<QRCodePayResponse> callback) |
Refund |
Leona.refund(RefundRequest req) |
void |
Leona.refund(RefundRequest req,
Callback<Refund> callback) |
Copyright © 2020. All rights reserved.