文档更新

master
yixian 3 years ago
parent 2bbabab137
commit cf4508b48b

@ -38,74 +38,8 @@ orderBasic:
properties:
pay_type:
type: string
description: 钱包类型AlipayPlus 线上订单必填默认是alipay_cn
enum:
- alipay_cn
- alipay_hk
- gcash
- dana
- bkash
- kakaopay
- easy_paisa
- tng
- truemoney
flights:
type: array
description: 航班信息如果有多个航班需分开填入如果商户业务类型是航班类型且钱包类型为alipay_cn时必填
items:
type: object
properties:
flight_no:
type: string
description: 航班号
departure_time:
type: string
format: date-time
example: '202103011203'
pattern: yyyyMMddHHmm
description: 起飞时间(当地时区)
hotels:
type: array
description: 酒店预订信息如果有多个酒店则分开录入如果商户类型为旅游且钱包类型为alipay_cn时必填
items:
type: object
properties:
name:
type: string
description: 酒店名称
check_in_time:
type: string
format: date
example: '20210301'
pattern: yyyyMMdd
description: 入住日期
check_out_time:
type: string
format: date
example: '20210302'
pattern: yyyyMMdd
description: 离店日期
schools:
type: array
description: 留学信息如果存在多个则分开录入如果商户类型为留学且钱包类型为alipay_cn时必填
items:
type: object
properties:
admission_notice_url:
type: string
description: 学校AdmissionNotice网页地址
goods:
type: array
description: 商品信息如果存在多个则分开录入如果商户类型为贸易且钱包类型为alipay_cn时必填
items:
type: object
properties:
name:
type: string
description: 商品名称
quantity:
type: number
description: 数量
description: |
指定钱包类型。对于AlipayPlus线上订单如果提供具体钱包类型可直接进入对应钱包收银台否则将进入钱包选择界面让消费者选择支付。参数来源于【查询可用子渠道】
orderWithChannel:
allOf:
- $ref: '#/orderBasic'
@ -407,6 +341,64 @@ transactionItem:
remark:
type: string
description: 备注
consultPaymentRequest:
type: object
required:
- currency
- amount
- terminal_type
properties:
currency:
type: string
description: |
即将下单的币种,[ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) 标准3字母币种编码如AUD
amount:
type: integer
description: 即将下单的金额,单位是货币最小单位
terminal_type:
type: string
enum:
- WEB
- H5
- APP
description: 下单类型是PC端WEB页面还是移动端的H5页面大小写敏感
user_region:
type: string
description: |
[ISO-3166](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en) 标准双字符国家编码消费者所在国家影响推荐的钱包优先级如韩国顾客会优先返回KAKAOPAY
os_type:
type: string
description: 消费者支付场景操作系统类型通常用于APP支付场景大小写敏感
enum:
- IOS
- ANDROID
client_ip:
type: string
description: 消费者所在ip
user_agent:
type: string
description: 如果是移动端支付可提供User-Agent信息用于判断当前消费者可用的钱包
consultResultItemAlipayPlus:
type: object
required:
- sub_channel
- enabled
properties:
sub_channel:
type: string
description: 钱包名称用于作为pay_type参数传递给下单api
enabled:
type: boolean
description: 是否可用
preferred:
type: boolean
description: 是否推荐
logo:
type: string
description: 钱包logo图片地址
disable_reason:
type: string
description: 钱包不可用原因
customInfo:
type: object
properties:

@ -166,6 +166,39 @@ security:
nonce_str: []
time: []
paths:
/gateway/partners/{partner_code}/consult_payment:
post:
tags:
- ChannelGateway
- MobileH5
- SDK Payment
summary: 查询可用子渠道
description: |
用于AlipayPlus渠道查询可用子渠道。
可调用当前接口获取消费者可用的钱包列表,并展示给消费者自主选择。
parameters:
- in: path
name: partner_code
required: true
requestBody:
content:
application/json:
schema:
$ref: 'components_order.yml#/consultPaymentRequest'
responses:
200:
description: 查询结果
content:
application/json:
schema:
type: object
required:
- sub_channels
properties:
sub_channels:
type: array
items:
$ref: 'components_order.yml#/consultResultItemAlipayPlus'
/gateway/partners/{partner_code}/orders/{partner_order_id}:
put:
tags:

@ -1,4 +1,3 @@
orderBasic:
required:
- description
@ -32,6 +31,16 @@ orderBasic:
or in format: digits with 'm' or 'h' tail. m=minutes, h=hours.
default is 5m. if merchants has a global configuration in our backend, it will take the configuration.
no shorter than 1m and no longer than 24h
extra:
type: object
properties:
pay_type:
type: string
description: |
Determine wallet type. For AlipayPlus orders, merchant can determine which wallet to use so that it will directly go into cashier page.
Otherwise a wallet choice page will be shown to customers to determine which wallet they want to use.
value comes from ConsultPayment API
orderWithChannel:
allOf:
- $ref: '#/orderBasic'
@ -328,6 +337,65 @@ transactionItem:
remark:
type: string
description: transaction remark
consultPaymentRequest:
type: object
required:
- currency
- amount
- terminal_type
properties:
currency:
type: string
description: |
Currency of the incoming payment. Should be 3-character code in [ISO-4217](https://www.iso.org/iso-4217-currency-codes.html). For example, AUD
amount:
type: integer
description: Order amount of the incoming payment. Should be minimal unit of the currency.
terminal_type:
type: string
enum:
- WEB
- H5
- APP
description: Web is for pc browser paying, H5 is for mobile browser or inner webview in wallet apps. APP is for merchant's App. case-sensitive
user_region:
type: string
description: |
Standard 2-character code in [ISO-3166](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en). Which country is your customer in.
This will help to determine which wallet is suggested. For example, a South-Korea customer will be recommended to use KakaoPay
os_type:
type: string
description: For App payment. Pass this os is customer using. Case-sensitive
enum:
- IOS
- ANDROID
client_ip:
type: string
description: customer ip address
user_agent:
type: string
description: If customer is in the inner webview of wallet. this will help to determine which wallet should be recommended
consultResultItemAlipayPlus:
type: object
required:
- sub_channel
- enabled
properties:
sub_channel:
type: string
description: wallet name. should be passed as pay_type parameter in new order requests
enabled:
type: boolean
description: is this wallet available to use
preferred:
type: boolean
description: is this wallet recommended
logo:
type: string
description: wallet logo
disable_reason:
type: string
description: reason for why this wallet was unable to use
customInfo:
type: object
properties:

@ -174,6 +174,39 @@ security:
nonce_str: []
time: []
paths:
/gateway/partners/{partner_code}/consult_payment:
post:
tags:
- ChannelGateway
- MobileH5
- SDK Payment
summary: ConsultPayment
description: |
Used for check which pay_type is available for AlipayPlus channel.
You can call this api to get available wallets and ask customers to choose.
parameters:
- in: path
name: partner_code
required: true
requestBody:
content:
application/json:
schema:
$ref: 'components_order.yml#/consultPaymentRequest'
responses:
200:
description: 查询结果
content:
application/json:
schema:
type: object
required:
- sub_channels
properties:
sub_channels:
type: array
items:
$ref: 'components_order.yml#/consultResultItemAlipayPlus'
/gateway/partners/{partner_code}/orders/{partner_order_id}:
put:
tags:

Loading…
Cancel
Save