public class PayPalApi extends Object
IJPay 让支付触手可及,封装了微信支付、支付宝支付、银联支付等常用的支付方式以及各种常用的接口。
不依赖任何第三方 mvc 框架,仅仅作为工具使用简单快速完成支付模块的开发,可轻松嵌入到任何系统里。
IJPay 交流群: 723992875
Node.js 版: https://gitee.com/javen205/TNWX
PayPal Api
Constructor and Description |
---|
PayPalApi() |
public static String getReqUrl(PayPalApiUrl payPalApiUrl, boolean isSandBox)
payPalApiUrl
- PayPalApiUrl
支付 API 接口枚举isSandBox
- 是否是沙箱环境String
返回完整的接口请求URLpublic static IJPayHttpResponse getToken(PayPalApiConfig config)
config
- PayPalApiConfig
支付配置IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse createOrder(PayPalApiConfig config, String data)
config
- PayPalApiConfig
支付配置data
- 请求参数IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse updateOrder(PayPalApiConfig config, String id, String data)
config
- PayPalApiConfig
支付配置id
- 订单号data
- 请求参数IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse queryOrder(PayPalApiConfig config, String orderId)
config
- PayPalApiConfig
支付配置orderId
- 订单号IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse captureOrder(PayPalApiConfig config, String id, String data)
config
- PayPalApiConfig
支付配置id
- 订单号data
- 请求参数IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse captureQuery(PayPalApiConfig config, String captureId)
config
- PayPalApiConfig
支付配置captureId
- 订单号IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse refund(PayPalApiConfig config, String captureId, String data)
config
- PayPalApiConfig
支付配置captureId
- 订单号data
- 请求参数IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse refundQuery(PayPalApiConfig config, String id)
config
- PayPalApiConfig
支付配置id
- 订单号IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse post(String url, Map<String,Object> params, Map<String,String> headers)
url
- 请求 urlparams
- Map
请求参数headers
- Map
请求头IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse get(String url, Map<String,Object> params, Map<String,String> headers)
url
- 请求 urlparams
- Map
请求参数headers
- Map
请求头IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse post(String url, String data, Map<String,String> headers)
url
- 请求 urldata
- String
请求参数headers
- Map
请求头IJPayHttpResponse
请求返回的结果public static IJPayHttpResponse patch(String url, String data, Map<String,String> headers)
url
- 请求 urldata
- String
请求参数headers
- Map
请求头IJPayHttpResponse
请求返回的结果public static Map<String,String> getBaseHeaders(AccessToken accessToken)
Copyright © 2022. All rights reserved.