## 渠道专属配置
### 1 WX渠道
#### 1.1 二维码无跳转模式
该模式返回生成二维码的字符串,商户需要自己生成二维码。
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | -------- |
| tradeFrom | String | M | "QRCODE" |
响应参数:
| 参数 | 类型 | 属性 | 描述 |
| -------- | ------ | ---- | ------------------------------- |
| RespCode | String | M | 应答码 00-成功 |
| RespMsg | String | M | 应答消息 |
| code_url | String | O | 二维码字符串。应答码为00返回该参数 |
#### 1.2 二维码跳转模式
该模式会为商户跳转到GoAllPay生成好的二维码页面,无需商户自己生成。
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ------- |
| tradeFrom | String | M | "QUICK" |
#### 1.3 公众号支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ------- |
| tradeFrom | String | M | "JSAPI" |
#### 1.4 小程序支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---------- |
| tradeFrom | String | M | "APPLET" |
| openid | String | M | 微信openid |
响应参数:
| 参数 | 类型 | 属性 | 描述 |
| ---------- | ------ | ---- | ------------------------------------------------------ |
| RespCode | String | M | 应答码 00-成功 |
| RespMsg | String | M | 应答消息 |
| sdk_params | String | O | 小程序支付所需参数(JSON字符串)。应答码为00返回该参数 |
将上述返回数据放入微信小程序支付接口,即可调起支付,具体方法,参考微信官方小程序API。
#### 1.5 APP支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ----- |
| tradeFrom | String | M | "APP" |
响应参数:
| 参数 | 类型 | 属性 | 描述 |
| -------- | ------ | ---- | --------------------------------------------------------- |
| RespCode | String | M | 应答码 00-成功 |
| RespMsg | String | M | 应答消息 |
| tn | String | O | 交易流水号,RespCode为“00”时返回,作为调起 sdk 支付的参数 |
获取到tn后,根据APP对接文档调用SDK进行支付。
### 2 AP渠道
#### 2.1 WebSite支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ----- |
| tradeFrom | String | M | "WEB" |
#### 2.2 H5支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ------- |
| tradeFrom | String | M | "JSAPI" |
#### 2.3 APP支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ----- |
| tradeFrom | String | M | "APP" |
响应参数:
| 参数 | 类型 | 属性 | 描述 |
| -------- | ------ | ---- | --------------------------------------------------------- |
| RespCode | String | M | 应答码 00-成功 |
| RespMsg | String | M | 应答消息 |
| tn | String | O | 交易流水号,RespCode为“00”时返回,作为调起 sdk 支付的参数 |
获取到tn后,根据APP对接文档调用SDK进行支付。
#### 2.4 二维码无跳转模式
该模式返回生成二维码的字符串,商户需要自己生成二维码。
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | -------- |
| tradeFrom | String | M | "QRCODE" |
响应参数:
| 参数 | 类型 | 属性 | 描述 |
| -------- | ------ | ---- | ---------------------------------- |
| RespCode | String | M | 应答码 00-成功 |
| RespMsg | String | M | 应答消息 |
| code_url | String | O | 二维码字符串。应答码为00返回该参数 |
#### 2.5 小程序支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | -------- |
| tradeFrom | String | M | "APPLET" |
响应参数:
| 参数 | 类型 | 属性 | 描述 |
| ---------- | ------ | ---- | ---------------------------------------- |
| RespCode | String | M | 应答码 00-成功 |
| RespMsg | String | M | 应答消息 |
| sdk_params | String | O | 小程序支付所需参数。应答码为00返回该参数 |
将上述返回数据放入支付宝小程序支付接口,即可调起支付,具体方法,参考支付宝官方小程序API。
### 3 UP渠道
#### 3.1 H5支付,自适应PC和移动端
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---- |
| tradeFrom | String | M | "H5" |
#### 3.2 APP支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ----- |
| tradeFrom | String | M | "APP" |
响应参数:
| 参数 | 类型 | 属性 | 描述 |
| -------- | ------ | ---- | ------------------------------------------------------- |
| RespCode | String | M | 应答码 00-成功 |
| RespMsg | String | M | 应答消息 |
| tn | String | O | 交易流水号,RespCode为“00”时返回,作为调起 sdk 支付的参数 |
获取到tn后,根据APP对接文档调用SDK进行支付。
#### 3.3 二维码无跳转模式
该模式返回生成二维码的字符串,商户需要自己生成二维码。
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | -------- |
| tradeFrom | String | M | "QRCODE" |
响应参数:
| 参数 | 类型 | 属性 | 描述 |
| -------- | ------ | ---- | ---------------------------------- |
| RespCode | String | M | 应答码 00-成功 |
| RespMsg | String | M | 应答消息 |
| code_url | String | O | 二维码字符串。应答码为00返回该参数 |
#### 3.4 Express Pay
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | -------- |
| tradeFrom | String | M | "PAN-PRESENT" |
| cardno | String | M | 卡号 |
| cvv | String | M | cvv2 |
| expired | String | M | 有效期 YYMM |
```javascript
测试卡:
Credit card:6250947000000014
mobile:+852 11112222
cvn2: 123
exp date: month 12 year 33
SMS Code on PC: 111111
SMS Code on Mobile: 123456
Debit card:6223164991230014
mobile:13012345678
PIN: 111111
cvn2: 123
exp date: month 12 year 33
SMS Code on PC:111111
SMS Code on Mobile:123456
Credit card:8171999927660000
mobile:+852 11112222
cvn2: 123
exp date: month 12 year 30
SMS Code on PC: 111111
SMS Code on Mobile: 123456
```
### 4 Apple Pay渠道
#### 4.1 APP支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ----- |
| tradeFrom | String | M | "APP" |
响应参数:
| 参数 | 类型 | 属性 | 描述 |
| -------- | ------ | ---- | ------------------------------------------------------- |
| RespCode | String | M | 应答码 00-成功 |
| RespMsg | String | M | 应答消息 |
| tn | String | O | 交易流水号,RespCode为“00”时返回,作为调起 sdk 支付的参数 |
获取到tn后,根据APP对接文档调用SDK进行支付。
### 5 FC渠道
#### 5.1 H5支付
##### 5.1.1 CIL外卡
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---- |
| tradeFrom | String | M | "H5" |
```javascript
CIL测试卡:
卡号: 4761340000000019
有效期: 1217
CVV2: 830
卡号: 5204730000002555
有效期: 1225
CVV2: 123
```
##### 5.1.2 SN外卡
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---- |
| tradeFrom | String | M | "H5" |
| billCountry | String | O | 账单国家/地区,2位国家码,如:US |
| billState | String | O | 账单州/省/邦,2位编码,如:CA |
| billCity | String | O | 账单城市 |
| billStreet | String | O | 账单地址 |
| billEmail | String | O | 账单邮箱 |
| billPostalCode | String | O | 账单邮编 |
| logisticsCountry | String | O | 物流国家/地区,2位国家码,如:US |
| logisticsState | String | O | 物流州/省/邦,2位编码,如:CA |
| logisticsCity | String | O | 物流城市 |
| logisticsStreet | String | O | 物流地址 |
| logisticsPostalCode | String | O | 物流邮编 |
| logisticsEmail | String | O | 物流邮箱 |
```javascript
SN测试卡:
卡号: 5309289710447190
有效期: 0825
CVV2: 900
```
##### 5.1.3 TL外卡
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| ------------------- | ------ | ---- | -------------------------------- |
| tradeFrom | String | M | "H5" |
| email | String | O | 持卡人电子邮件地址 |
| logisticsCountry | String | O | 物流国家/地区,2位国家码,如:US |
| logisticsState | String | O | 物流州/省/邦,2位编码,如:CA |
| logisticsCity | String | O | 物流城市 |
| logisticsStreet | String | O | 物流地址 |
| logisticsPostalCode | String | O | 物流邮编 |
| logisticsPhone | String | O | 物流电话 |
```javascript
TL测试卡:
卡号: 4012001037141112
有效期: 1227
CVV2: 212
```
##### 5.1.4 ICBC外卡
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ------------------------------------------------------------ |
| tradeFrom | String | M | "H5" |
| ieu | String | M | 语言标示。
葡语: pt-BR
英语: en-US
简体中文: zh-CN
繁体中文: zh-TW
必须严格按照文档描述大小写上送。 |
**ICBC测试卡:**
点击卡号获取短信验证码
卡号1:[4574108900117879](https://gwinternet.icbcmo.site/sms-inq-svc/v1/inqByCardNo?cardNo=4574108900117879)
卡号2:[4377651201379895](https://gwinternet.icbcmo.site/sms-inq-svc/v1/inqByCardNo?cardNo=4377651201379895)
卡号3:[5440163901773005](https://gwinternet.icbcmo.site/sms-inq-svc/v1/inqByCardNo?cardNo=5440163901773005)
卡号4:[5305063800002981](https://gwinternet.icbcmo.site/sms-inq-svc/v1/inqByCardNo?cardNo=5305063800002981)
卡号5:[5305066800004683](https://gwinternet.icbcmo.site/sms-inq-svc/v1/inqByCardNo?cardNo=5305066800004683)
卡号6:[5305063800001223](https://gwinternet.icbcmo.site/sms-inq-svc/v1/inqByCardNo?cardNo=5305063800001223)
##### 5.1.5 RDP外卡
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---- |
| tradeFrom | String | M | "H5" |
```javascript
RDP测试卡:
卡号: 4111111111111111
有效期: 122027
CVV2: 123
卡号: 5200000900007102
有效期: 122027
CVV2: 123
```
##### 5.1.6 VT外卡
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---- |
| tradeFrom | String | M | "H5" |
```javascript
VT测试卡:
卡号: 4111111111111111
有效期: 1227
CVV2: 123
```
#### 5.2 后台支付(适用于SN和TL外卡)
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---- |
| tradeFrom | String | M | "API" |
| cardNo | String | M | 卡号 |
| expDate | String | M | 有效期,格式:MMYY |
| cvnCode | String | M | CVN |
| lastName | String | M | Last Name |
| firstName | String | M | First Name |
| billCountry | String | O | 账单国家/地区,2位国家码,如:US |
| billState | String | O | 账单州/省/邦,2位编码,如:CA |
| billCity | String | O | 账单城市 |
| billStreet | String | O | 账单地址 |
| billEmail | String | O | 账单邮箱 |
| billPostalCode | String | O | 账单邮编 |
| billPhone | String | O | 账单电话 |
| logisticsCountry | String | O | 物流国家/地区,2位国家码,如:US |
| logisticsState | String | O | 物流州/省/邦,2位编码,如:CA |
| logisticsCity | String | O | 物流城市 |
| logisticsStreet | String | O | 物流地址 |
| logisticsPostalCode | String | O | 物流邮编 |
| logisticsEmail | String | O | 物流邮箱 |
| logisticsPhone | String | O | 物流电话 |
| pcToken2 | String | O | 设备指纹 |
| forterTokenCookie | String | O | 客户端埋点 |
| userIP | String | O | 用户IP |
### 6 RevPay渠道
#### 6.1 H5支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | -------- |
| tradeFrom | String | M | "H5" |
| Payment_ID | String | M | Axiata Boost: 11
Grab Pay: 17
Touch ’n Go: 28
Maybank QR: 12 |
### 7 AliPayLocal渠道
#### 7.1 H5支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ------- |
| tradeFrom | String | M | "H5" |
| sub_brand_code | String | M | "gcash", "dana", "kakaopay", "alipay_hk" 选其中一个上送 |
### 8 PO渠道
#### 8.1 H5支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| ----------------- | ------ | ---- | ------------------------------------------------------------ |
| tradeFrom | String | M | "H5" |
| tag | String | M | 取值如下:directpay, boleto, webpay, trustpay, skrill, sepaddmodela, safetypay, qiwi, p24, poli, paysafecard, mybank, itau, ideal, hipercard, giropay, eps, enets, dragonpay, bancodobrasil, baloto, aura, payu, bcmc, santander, pagofacil, rapipago, konbini, payeasy, doku, ovo, grabpayotp |
| countrycode | String | M | The 2-letter ISO country code of the country in which the payment instrument is issued/operated (e.g. DE). For details see [payment method specific documentation](countrycode.md). |
| accountholdername | String | M | The account holder - minimum of 3 characters, up to 100 characters. |
##### 8.1.1 当 tag 为 paysafecard 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ----------- | ------ | ---- | ------------------------------------------------------------ |
| consumerref | String | M | Unique reference identifying the consumer, has to satisfy the regular expression [A-Za-z0-9.%,&/+*$-]{1,20} |
##### 8.1.2 当 tag 为 aura, baloto, bancodobrasil, boleto, hipercard, itau, webpay 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ----------- | ------ | ---- | ------------------------------------------------------------ |
| consumerref | String | M | Unique reference identifying the consumer, has to satisfy the regular expression [A-Za-z0-9.%,&/+*$-]{1,20} |
| nationalid | String | M | Consumer’s national id (up to 30 characters) |
| email | String | M | RFC compliant email address of the account holder |
| address | String | M | Consumer's address |
| zipcode | String | M | Consumer's zip/postal code |
| dob | String | O | Date of birth, format YYYYMMDD |
##### 8.1.3 当 tag 为 dragonpay, enets 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ----- | ------ | ---- | ------------------------------------------------------ |
| email | String | M | RFC compliant email address of the account holder |
| phone | String | M | Valid international phone number of the account holder |
##### 8.1.4 当 tag 为 giropay, directpay 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ---- | ------ | ---- | ----------------------------------------------------------- |
| bic | String | O | Valid BIC (8 or 11 alphanumeric letters) of consumer’s bank |
##### 8.1.5 当 tag 为 payu, p24, safetypay 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ----- | ------ | ---- | ------------------------------------------------- |
| email | String | M | RFC compliant email address of the account holder |
##### 8.1.6 当 tag 为 qiwi 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ----------- | ------ | ---- | ------------------------------------------------------------ |
| mobilephone | String | M | Valid international Russian mobile phone number identifying the QIWI destination account to pay out to (excluding plus sign or any other international prefixes, including a leading 7 for Russia, 11 digits in total, e.g. 71234567890). |
| siteid | String | M | Unique site identifier, forwarded to qiwi. Required for clients serving multiple points of sale. |
##### 8.1.7 当 tag 为 skrill 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ------- | ------ | ---- | ------------------------------------------------- |
| email | String | O | RFC compliant email address of the account holder |
| address | String | O | Consumer's address |
| zipcode | String | O | Consumer's zip/postal code |
| city | String | O | Consumer’s city |
##### 8.1.8 当 tag 为 sepaddmodela 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ----- | ------ | ---- | ------------------------------------------------- |
| email | String | M | RFC compliant email address of the account holder |
| iban | String | M | Valid IBAN |
##### 8.1.9 当 tag 为 bcmc 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ----- | ------ | ---- | ------------------------------------------------- |
| BEPURL | String | O | Trigger URL for mobile payment options in the form BEP://1BC.GIROGATE.DE/BCMC/123456789$ICAE3BUIH5P9U53Y5HKA9CRT (contrived example). |
##### 8.1.10 当 tag 为 santander, pagofacil, rapipago 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ----- | ------ | ---- | ------------------------------------------------- |
| nationalid | String | M | Consumer’s national id (up to 30 characters) |
| consumerref | String | O | Unique reference identifying the consumer, has to satisfy the following regular expression: [A-Za-z0-9.%,&/+*$-]{1,20} |
| email | String | M | RFC compliant email address of the account holder |
##### 8.1.11 当 tag 为 konbini, payeasy 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ----- | ------ | ---- | ------------------------------------------------- |
| phone | String | M | Consumer phone number without hyphens, country code or other characters (single-byte alphanumeric; must be between 10-11 digits) |
| email | String | M | RFC compliant email address of the account holder|
| iteminfo | String | M | Information about the item(s) being purchased, displayed on the payment page (up to 22 characters) |
##### 8.1.12 当 tag 为 doku, ovo 时,还需另外增加下面参数
| 参数 | 类型 | 属性 | 描述 |
| ---------- | ------ | ---- | ------------------------------------------------------------ |
| email | String | M | RFC compliant email address of the account holder |
| orderitems | String | M | The list of purchased items.
Make sure you follow the following format for the orderitems parameter: "<item_description>,<unit_price_with_two_decimal_places>,<quantity>,<total_cost_per_item_with_two_decimal_places>". Use commas to separate each field and semicolon to separate each item. The only allowed characters in the item description are alphanumeric, blank space, hyphen, and dot. Ensure that the total cost of all items equals the transaction amount. If the format or the total cost of the items are not correct, the order details do not show on payment page.
Example:
"table,1000.00,2,2000.00;Laptop 2.0,15000.00,2,30000.00"
In the example above, there are two items in the basket:
1. Item 1
• Description: table
• Unit price: 1000.00
• Quantity: 2
• Total cost: 2000.00
2. Item 2
• Description: Laptop 2.0
• Unit price: 15000.00
• Quantity: 2
• Total cost: 30000.00
The total transaction amount is 32000.00 |
### 9 India_Netbanking渠道
#### 9.1 H5支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---- |
| tradeFrom | String | M | "H5" |
| bank_code | String | M |[见列表](India_Netbanking_BankCode.md) |
| email | String | M | Must contain valid e-mail of customer|
| phone | String | M | Must contain valid phone number of customer |
| firstname | String | M | Customer first name |
| lastname | String | M | Customer last name |
| address | String | M | address |
| zip_code | String | M | ZIP code |
| city | String | M | City |
| country | String(2) | M |Country code in ISO 3166. Example: IN|
| document_id | String | M | Consumer's Indian PAN. Must be string with 10 alphanumeric letters. 5 letters, followed by 4 numbers, followed by 1 letter or number. Example: ABCDE1234F|
### 10 PAYPAL渠道
#### 10.1 H5支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---- |
| tradeFrom | String | M | "H5" |
### 11 Neosurf渠道
#### 11.1 H5支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---- |
| tradeFrom | String | M | "H5" |
| email | String | M | Must contain valid e-mail of customer|
| phone | String | M | Must contain valid phone number of customer |
| firstname | String | M | Customer first name |
| lastname | String | M | Customer last name |
| address | String | M | address |
| zip_code | String | M | ZIP code |
| city | String | M | City |
| country | String(2) | M |Country code in ISO 3166. Example: DE|
```javascript
测试Pincode:2639777698
```
### 12 DNC渠道
#### 12.1 H5支付
消费接口专属参数
| 参数 | 类型 | 属性 | 描述 |
| --------- | ------ | ---- | ---- |
| tradeFrom | String | M | "H5" |
```javascript
测试卡:
卡号: 5204730000002555
有效期: 1225
CVV2: 123
```