glhcp/server/vendor/alipaysdk/easysdk/README.md

207 lines
16 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Falipay%2Falipay-easysdk.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Falipay%2Falipay-easysdk?ref=badge_shield)
[![Maven Central](https://img.shields.io/maven-central/v/com.alipay.sdk/alipay-easysdk.svg)](https://mvnrepository.com/artifact/com.alipay.sdk/alipay-easysdk)
[![NuGet](https://badge.fury.io/nu/AlipayEasySDK.svg)](https://badge.fury.io/nu/AlipayEasySDK)
[![Packagist](https://poser.pugx.org/alipaysdk/easysdk/v/stable)](https://packagist.org/packages/alipaysdk/easysdk)
使 Alipay **Easy** SDK
******SDK**Alipay Easy SDK****访****
##
Alipay SDKAlipay Easy SDKAPIAPI使便
APIAlipay Easy SDK[](#extension)API使
Alipay Easy SDK[](https://opendocs.alipay.com/mini/00am3f)相对应的代码组织结构让开发者可以快速找到不同能力对应的API。
Alipay Easy SDK****
###
| Alipay Easy SDK | Alipay SDK |
|------------------|----------------------------------------------------------------|
| | |
| Factory | AlipayClient |
| API | API |
* Alipay Easy SDK :smiley:
```java
Factory.Payment.Common().create("Iphone6 16G", "202003019443", "0.10", "2088002656718920");
```
* Alipay SDK :confused:
```java
AlipayTradeCreateRequest request = new AlipayTradeCreateRequest();
AlipayTradeCreateModel model = new AlipayTradeCreateModel();
model.setSubject("Iphone6 16G");
model.setOutTradeNo("202003019443");
model.setTotalAmount("0.10");
model.setBuyerId("2088002656718920");
...
request.setBizModel(model);
...
alipayClient.execute(request);
```
###
* Alipay Easy SDKAlipay SDKHTTP访Open APIAlipay SDKOpen APIAlipay Easy SDKAPIAlipay Easy SDKAlipay SDK
* Alipay Easy SDKAPI[API](#apiList)[](./APIDoc.md#generic)
* Alipay Easy SDKAPIAlipay Easy SDK便
##
###
Alipay Easy SDKSDK
###
API
> [API](#spec)
###
Alipay Easy SDKAPI`Open API`
<a name="extension"/>
###
FluentAPIAPI
```java
// 通过调用agent方法扩展支持ISV代调用场景
Factory.Payment.FaceToFace().agent("ca34ea491e7146cc87d25fca24c4cD11").preCreate(...)
// 通过调用optional方法扩展支持个性化可选参数
Factory.Payment.FaceToFace().optional("extend_params", extendParams).preCreate(...)
// 多种扩展可灵活搭配,不同扩展方法功能详细说明请前往各语言主页中的“快速开始-扩展调用”栏目中查看
Factory.Payment.FaceToFace()
.agent(...)
.optionalArgs(...)
.auth(...)
.asyncNotify(...)
.preCreate(...)
```
### /
API
[API Doc](./APIDoc.md)API使
> 使`TestAccout``privateKey.json`
###
Alipay Easy SDK[`Darabonba`](https://github.com/aliyun/darabonba)进行架构通过DSL中间语言定义API模型再基于DSL语言自动生成不同编程语言Java、C#、PHP、TS等实现的SDK极大地提升了SDK能力的扩展效率和适用范围同时也保证了相同的`Easy API`在不同语言生态中体验的一致性。
APIDSL[tea](./tea)
###
SDKMavenNuGetComposerNPM etc.使SDK
##
Alipay Easy SDK`Java``C#``PHP`
**使******
[Java](./java)
[C#](./csharp)
[PHP](./php)
<a name="spec"/>
## API
Alipay Easy SDKAPI
> Factory...( ... )
使[](https://opendocs.alipay.com/mini/00am3f)中`营销能力`下的`模板消息`场景中的`小程序发送模板消息`,只需按如下形式编写调用代码即可(不同编程语言的连接符号可能不同)。
`Factory.Marketing.TemplateMessage().send( ... )`
OpenAPIOpenAPIOpenAPI使
Alipay Easy SDKAPI
<a name="apiList"/>
## API
| | | | OpenAPI |
|-----------|-----------------|------------------------|-----------------------------------------------------------|
| Base<br/> | OAuth<br/> | getToken<br/>访user_id | alipay\.system\.oauth\.token |
| Base<br/> | OAuth<br/> | refreshToken<br/>访 | alipay\.system\.oauth\.token |
| Base<br/> | Qrcode<br/> | create<br/> | alipay\.open\.app\.qrcode\.create |
| Base<br/> | Image<br/> | upload<br/> | alipay\.offline\.material\.image\.upload |
| Base<br/> | Video<br/> | upload<br/> | alipay\.offline\.material\.image\.upload |
| Member<br/> | Identification<br/> | init<br/> | alipay\.user\.certify\.open\.initialize |
| Member<br/> | Identification<br/> | certify<br/> | alipay\.user\.certify\.open\.certify |
| Member<br/> | Identification<br/> | query<br/> | alipay\.user\.certify\.open\.query |
| Payment<br/> | Common<br/> | create<br/> | alipay\.trade\.create |
| Payment<br/> | Common<br/> | query<br/> | alipay\.trade\.query |
| Payment<br/> | Common<br/> | refund<br/>退 | alipay\.trade\.refund |
| Payment<br/> | Common<br/> | close<br/> | alipay\.trade\.close |
| Payment<br/> | Common<br/> | cancel<br/> | alipay\.trade\.cancel |
| Payment<br/> | Common<br/> | queryRefund<br/>退 | alipay\.trade\.fastpay\.refund\.query |
| Payment<br/> | Common<br/> | downloadBill<br/> | alipay\.data\.dataservice\.bill\.downloadurl\.query |
| Payment<br/> | Common<br/> | verifyNotify<br/> | - |
| Payment<br/> | Huabei<br/> | create<br/> | alipay\.trade\.create |
| Payment<br/> | FaceToFace<br/> | pay<br/> | alipay\.trade\.pay |
| Payment<br/> | FaceToFace<br/> | precreate<br/> | alipay\.trade\.precreate |
| Payment<br/> | App<br/>APP | pay<br/>使 SDK | alipay\.trade\.app\.pay |
| Payment<br/> | Page<br/> | pay<br/> | alipay\.trade\.page\.pay |
| Payment<br/> | Wap<br/> | pay<br/> | alipay\.trade\.wap\.pay |
| Security<br/> | TextRisk<br/> | detect<br/> | alipay\.security\.risk\.content\.detect |
| Marketing<br/> | Pass<br/> | createTemplate<br/> | alipay\.pass\.template\.add |
| Marketing<br/> | Pass<br/> | updateTemplate<br/> | alipay\.pass\.template\.update |
| Marketing<br/> | Pass<br/> | addInstance<br/> | alipay\.pass\.instance\.add |
| Marketing<br/> | Pass<br/> | updateInstance<br/> | alipay\.pass\.instance\.update |
| Marketing<br/> | TemplateMessage<br/> | send <br/>| alipay\.open\.app\.mini\.templatemessage\.send |
| Marketing<br/> | OpenLife<br/> | createImageTextContent<br/> | alipay\.open\.public\.message\.content\.create |
| Marketing<br/> | OpenLife<br/> | modifyImageTextContent<br/> | alipay\.open\.public\.message\.content\.modify |
| Marketing<br/> | OpenLife<br/> | sendText<br/> | alipay\.open\.public\.message\.total\.send |
| Marketing<br/> | OpenLife<br/> | sendImageText<br/> | alipay\.open\.public\.message\.total\.send |
| Marketing<br/> | OpenLife<br/> | sendSingleMessage<br/> | alipay\.open\.public\.message\.single\.send |
| Marketing<br/> | OpenLife<br/> | recallMessage<br/> | alipay\.open\.public\.life\.msg\.recall |
| Marketing<br/> | OpenLife<br/> | setIndustry<br/> | alipay\.open\.public\.template\.message\.industry\.modify |
| Marketing<br/> | OpenLife<br/> | getIndustry<br/> | alipay\.open\.public\.setting\.category\.query |
| Util<br/> | AES<br/> | decrypt<br/> | - |
| Util<br/> | AES<br/> | encrypt<br/> | - |
| Util<br/> | Generic<br/> | execute<br/>OpenAPI | - |
> API
[API Doc](./APIDoc.md)API使
#
[](./CHANGELOG)
> `1.0.0``1.0.1`SDKBug
> `1.0.0``1.1.0`SDK
> `1.0.0``2.0.0`SDK
#
* [](https://open.alipay.com/platform/home.htm)
* [](https://docs.open.alipay.com/catalog)
* [](https://github.com/alipay/alipay-easysdk)
#
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Falipay%2Falipay-easysdk.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Falipay%2Falipay-easysdk?ref=badge_large)
#
使Alipay Easy SDK GitHub [ Issues](https://github.com/alipay/alipay-easysdk/issues/new)。
使
![Alipay Easy SDK](https://gw.alipayobjects.com/mdn/rms_0e15fa/afts/img/A*SUaHT7fpzSwAAAAAAAAAAABkARQnAQ)