上海翻譯公司完成電子系統(tǒng)“即時到賬接口 ”中文翻譯
時間:2019-08-28 16:08 來源:未知 作者:dl 點擊:次
上海翻譯公司完成電子系統(tǒng)“即時到賬接口 ”中文翻譯
![]()
手機網(wǎng)頁即時到賬接口
服務(wù)名稱: alipay.wap.trade.create.direct alipay.wap.auth.authAndExecute
版本號:1.2
支付寶(中國)網(wǎng)絡(luò)技術(shù)有限公司 版權(quán)所有
1 Document description
1.1 Function Description
“手機網(wǎng)頁即時到賬授權(quán)接口(alipay.wap.trade.create.direct)”和“手機網(wǎng)頁即時到賬交易接口(alipay.wap.auth.authAndExecute)”配套使用,共同完成即時到賬交易。
授權(quán)接口用于存儲商戶創(chuàng)建交易所需信息,并返回一個授權(quán)令牌(request_token);交易接口使用授權(quán)接口返回的授權(quán)令牌(request_token)值,將頁面重定向到支付寶支付頁面,使得付款者可以直接匯款給另一個擁有支付寶賬號的收款者。
授權(quán)接口并未實際創(chuàng)建即時到賬交易,創(chuàng)建即時到賬交易并且完成支付的過程由交易接口完成。
1.2 Readers
The document is prepared for the personnel who have the website development capability, learn about one of ASP, PHP, JAVA, ASP.NET development language and the website development, maintenance and management of SQL database language.
1.3 Business terms
Table 1-1 Business terms
Terms Explanation
Demand The process of transmitting the data requiring for delivery to the receiver
Notification Server aynchronous notice. After Alipay completes the data processing, Alipay will issue notice to the website of commercial user and give feedback to the commercial user website on the completed message after processing.
Returning Page Skipping synchronous notice. After Alipay completes the data processing, Alipay will skip from the current Alipay page to the website of commercial user and give feedback to the commercial user website on the completed message after processing.
支付失敗 余額不足、超額、交易被凍結(jié)、賬號被凍結(jié)、訂單已支付、訂單金額和支付金額不一致等都會導(dǎo)致支付失敗。
2 Function demonstration
圖2-1 手機網(wǎng)頁即時到賬業(yè)務(wù)流程圖
步驟1: 獲取token授權(quán)令牌
商戶調(diào)用“手機網(wǎng)頁即時到賬授權(quán)接口(alipay.wap.trade.create.direct)”,向支付寶發(fā)送訂單信息,以獲取token授權(quán)令牌。
步驟2: 即時到賬交易付款
商戶調(diào)用“手機網(wǎng)頁即時到賬交易接口(alipay.wap.auth.authAndExecute)”,驗證token值,并創(chuàng)建支付寶交易后完成支付,通知商戶并跳轉(zhuǎn)回商戶指定頁面鏈接。
3 Data interaction
Figure 3-1 Commercial user system requirement-Payment affects interactional mode
合作商戶系統(tǒng) System of commercial user in cooperation
支付寶系統(tǒng) Alipay system
構(gòu)造請求數(shù)據(jù) Structure request data
發(fā)送請求數(shù)據(jù) Issuing requirement data
請求的交易 Requested transaction
返回相應(yīng)數(shù)據(jù) Return he corresponding data
對相應(yīng)的數(shù)據(jù)進行處理 Process the corresponding data
(1) Structure request data
Commercial users obtain the data set with signature results transmitted to Alipay through the program according to the interface rule provided by Alipay.
(2) Issuing requirement data
Transmit the dataset in completed structure to Alipay through page link skipping or form list submitting.
(3) Process the corresponding data
After obtaining this set, at fist, adopt the safety verification. After a series of verification, the data request sent will be processed.
(4) Return the processed result data
授權(quán)接口
支付寶會把處理完成的結(jié)果數(shù)據(jù)以html的形式返回給商戶。
交易接口
As for the transaction after completing processing, Alipay will give feedback to commercial user website in the following ways.
– 程序上自動進行重新構(gòu)造URL地址鏈接,在用戶當(dāng)前頁面上通過自動跳轉(zhuǎn)的方式跳回商戶在請求時設(shè)定好的頁面路徑地址(參數(shù)call_back_url,在“手機網(wǎng)頁即時到賬授權(quán)接口(alipay.wap.trade.create.direct)”中指定);
– Alipay server gives a notice actively to invoke the page path address designated in request (Parameter “return_url”, if the commercial user fails to set up, the operation will not be adopted.
(5) Process the obtained returned result data專業(yè)翻譯公司
授權(quán)接口專業(yè)翻譯公司
商戶利用編程方法來模擬http請求遠程解析html,獲取支付寶返回的結(jié)果數(shù)據(jù)后,可以結(jié)合自身網(wǎng)站的業(yè)務(wù)邏輯進行數(shù)據(jù)處理。
交易接口
商戶在同步通知處理頁面(參數(shù)call_back_url指定頁面文件)或服務(wù)器異步通知頁面(參數(shù)notify_url指定頁面文件)獲取支付寶返回的結(jié)果數(shù)據(jù)后,可以結(jié)合自身網(wǎng)站的業(yè)務(wù)邏輯進行數(shù)據(jù)處理(如:訂單更新、自動充值到會員賬號中等)。
4 Request parameters
4.1 授權(quán)接口請求參數(shù)說明
4.1.1 Meanings
Request parameters are the request data provided for Alipay when commercial users have data interaction with Alipay, so as to benefit for Alipay to make further processing these data.
4.1.2 List
Table 4-1 Description request parameter
Parameters Parameter name Type (field length) Parameter description Null or not Samples
Basic parameters
service Interface name String Interface name Not Full alipay.wap.trade.create.direct
format 請求參數(shù)格式 String 請求參數(shù)格式。
固定取值xml。 Not Full xml
v 接口版本號 String 接口版本號。
固定取值2.0。 Not Full 2.0
partner Cooperator ID String(16) Only user name of corresponding Alipay of signed Alipay account, composed of 16-bit pure number headed with 2088 Not Full 2088101000137799
req_id 請求號 String(32) 用于關(guān)聯(lián)請求與響應(yīng),防止請求重播。
支付寶限制來自同一個partner的請求號必須唯一。 Not Full 1282889689836
sec_id 簽名方式 對參數(shù)簽名的方式。
取值范圍:
0001:RSA簽名算法
MD5:MD5簽名算法
Not Full 0001
sign 簽名 String 對請求或響應(yīng)中參數(shù)簽名后的值。 Not Full VRVr7adPfsHblFjiBkGWryhKIKt+CaI4Cq2MA2wG1ENVuBAyFDlp3FbttndmID0USlfn22a9/6fQ+X+KPDE09hcTNz3gJ1edUiDWxHXY/ahTexCP79SDtoHx29uepXsHBe32DP0k9jZbfhpT8Ly0+ksuo5VJO0iymxQ87hQPjJw=
Business parameters
Parameters Parameter name Type (field length) Parameter description Null or not Samples
req_data 請求業(yè)務(wù)參數(shù) String 請求業(yè)務(wù)參數(shù)請參考“表4-2 req_data請求業(yè)務(wù)參數(shù)列表”。
<direct_trade_create_req>:根節(jié)點
<subject>:商品名稱
<out_trade_no>:商戶網(wǎng)站唯一訂單號
<total_fee>:交易金額
<seller_account_name>:賣家支付寶賬號
<call_back_url>:支付成功跳轉(zhuǎn)頁面路徑
<notify_url>:服務(wù)器異步通知頁面路徑
<out_user>:商戶系統(tǒng)用戶唯一標識
<merchant_url>:操作中斷返回地址
<pay_expire>:交易自動關(guān)閉時間 Not Full <direct_trade_create_req><subject>彩票</subject><out_trade_no>1282889603601</out_trade_no><total_fee>10.01</total_fee><seller_account_name>[email protected]</seller_account_name><call_back_url>http://www.yoursite.com/waptest0504/servlet/CallBack</call_back_url><notify_url>http://www.yoursite.com/waptest0504/servlet/NotifyReceiver</notify_url><out_user>123456789</out_user><merchant_url>http://www.yoursite.com</merchant_url><pay_expire>3600</pay_expire></direct_trade_create_req>
表4-2 req_data請求業(yè)務(wù)參數(shù)列表
Parameters Parameter name Type ( field length) Parameter description Null or not Samples
subject Commodity name String(256) 用戶購買的商品名稱。 Not Full 彩票
out_trade_no Sole order number of commercial website String(64) Sole order number of Alipay cooperator commercial website. Not Full 1282889603601
total_fee Transaction amount String(15) 該筆訂單的資金總額,單位為RMB-Yuan。取值范圍為[0.01,100000000.00],精確到小數(shù)點后兩位。 Not Full 10.01
seller_account_name Seller Alipay account String(100) 賣家的支付寶賬號。交易成功后,買家資金會轉(zhuǎn)移到該賬戶中。 Not Full [email protected]
call_back_url 支付成功跳轉(zhuǎn)頁面路徑 String(200) 支付成功后的跳轉(zhuǎn)頁面鏈接。
支付成功才會跳轉(zhuǎn)。 Not Full http://www.yoursite.com/waptest0504/servlet/CallBack
notify_url 服務(wù)器異步通知頁面路徑 String(200) 支付寶服務(wù)器主動通知商戶網(wǎng)站里指定的頁面http路徑。 Full http://www.yoursite.com/waptest0504/servlet/NotifyReceiver
out_user 商戶系統(tǒng)用戶唯一標識 String(32) 買家在商戶系統(tǒng)的唯一標識。
當(dāng)該買家支付成功一次后,再次支付金額在30元內(nèi)時,不需要再次輸入密碼。 Full 123456789
merchant_url 操作中斷返回地址 String 用戶付款中途退出返回商戶的地址。 Full http://www.yoursite.com
pay_expire 交易自動關(guān)閉時間 String 交易自動關(guān)閉時間,單位為分鐘。
默認值21600(即15天)。 Full 3600
說明:
req_data參數(shù)的值不能包含半角或全角的“&”符號;
部分參數(shù)類型為String,未指明長度范圍,表明系統(tǒng)不校驗該參數(shù)的長度。
4.1.3 Samples
說明:
本樣例僅供參考,支付寶網(wǎng)關(guān)為http://wappaygw.alipay.com/service/rest.htm。
藍色為必填參數(shù),綠色為固定值參數(shù),紅色為選填參數(shù)。
http://wappaygw.alipay.com/service/rest.htm?req_data=<direct_trade_create_req><subject>彩票</subject><out_trade_no>1282889603601</out_trade_no><total_fee>10.01</total_fee><seller_account_name>[email protected]</seller_account_name><call_back_url>http://www.yoursite.com/waptest0504/servlet/CallBack</call_back_url><notify_url>http://www.yoursite.com/waptest0504/servlet/NotifyReceiver</notify_url><out_user>123456789</out_user><merchant_url>http://www.yoursite.com</merchant_url><pay_expire>3600</pay_expire></direct_trade_create_req>&service=alipay.wap.trade.create.direct&sec_id=0001&partner=2088101000137799&req_id=1282889689836&sign=VRVr7adPfsHblFjiBkGWryhKIKt+CaI4Cq2MA2wG1ENVuBAyFDlp3FbttndmID0USlfn22a9/6fQ+X+KPDE09hcTNz3gJ1edUiDWxHXY/ahTexCP79SDtoHx29uepXsHBe32DP0k9jZbfhpT8Ly0+ksuo5VJO0iymxQ87hQPjJw=&format=xml&v=2.0
4.2 交易接口請求參數(shù)說明
4.2.1 Meaning
請求參數(shù)是商戶在與支付寶進行數(shù)據(jù)交互時,提供給支付寶的請求數(shù)據(jù),以便支付寶根據(jù)這些數(shù)據(jù)進一步處理。
4.2.2 列表
表4-3 請求參數(shù)說明
Parameters Parameter name Type (field length) Parameter description Null or not Samples
Basic parameters
service Interface name String Interface name Not Full alipay.wap.auth.authAndExecute
format 請求參數(shù)格式 String 請求參數(shù)格式。
固定取值xml。 Not Full xml
v 接口版本號 String 接口版本號。
固定取值2.0。 Not Full 2.0
partner 合作者身份ID String(16) 商戶簽約的支付寶賬號對應(yīng)的支付寶唯一用戶號。
以2088開頭的16位純數(shù)字組成。 Not Full 2088101000137799
sec_id 簽名方式 String 對參數(shù)簽名的方式。
取值范圍:
0001:RSA簽名算法
MD5:MD5簽名算法 Not Full 0001
sign 簽名 String 對請求或響應(yīng)中參數(shù)簽名后的值。 Not Full LdXbwMLug8E4UjfJMuYv2KoD5X5F3vHGQsQbZ/rdEQ3eaN4FPal7rhsbZZ/+ZUL1kAKzTQSDdMk87MEWtWO1Yq6rhnt2Tv8Hh6Hb16211VXKgbBCpq861+LopRwegPbGStcwBuAyE4pi6fYlJ6gxzL4tMyeLe+T5XZ0RKRUk00U=
Business parameters
req_data 請求業(yè)務(wù)參數(shù) String 請求業(yè)務(wù)參數(shù)請參考“表4-4 req_data請求業(yè)務(wù)參數(shù)列表”。
<auth_and_execute_req>:根節(jié)點
<request_token>:授權(quán)令牌 Not Full <auth_and_execute_req><request_token>201008309e298cf01c58146274208eda1e4cdf2b</request_token></auth_and_execute_req>
Parameters Parameter name Type (field length) Parameter description Null or not Samples
request_token 授權(quán)令牌 String(40) 授權(quán)令牌,調(diào)用“手機網(wǎng)頁即時到賬授權(quán)接口(alipay.wap.trade.create.direct)”成功后返回該值。此參數(shù)值不能更改。 Not Full 201008309e298cf01c58146274208eda1e4cdf2b
說明:
只有支付成功時才會跳轉(zhuǎn)到call_back_url,支付失敗時跳轉(zhuǎn)到merchant_url(不返回任何參數(shù)),跳轉(zhuǎn)地址都在“手機網(wǎng)頁即時到賬授權(quán)接口(alipay.wap.trade.create.direct)”中設(shè)置。
部分參數(shù)類型為String,未指明長度范圍,表明系統(tǒng)不校驗該參數(shù)的長度。
4.2.3 Samples
說明:
本樣例僅供參考,支付寶網(wǎng)關(guān)為http://wappaygw.alipay.com/service/rest.htm。
所有參數(shù)都必傳,藍色為可變值參數(shù),綠色為固定值參數(shù)。
http://wappaygw.alipay.com/service/rest.htm?req_data=<auth_and_execute_req><request_token>201008309e298cf01c58146274208eda1e4cdf2b</request_token></auth_and_execute_req>&service=alipay.wap.auth.authAndExecute&sec_id=0001&partner=2088101000137799&sign=LdXbwMLug8E4UjfJMuYv2KoD5X5F3vHGQsQbZ/rdEQ3eaN4FPal7rhsbZZ/+ZUL1kAKzTQSDdMk87MEWtWO1Yq6rhnt2Tv8Hh6Hb16211VXKgbBCpq861+LopRwegPbGStcwBuAyE4pi6fYlJ6gxzL4tMyeLe+T5XZ0RKRUk00U=&format=xml&v=2.0
5 返回參數(shù)
5.1 授權(quán)接口html同步返回參數(shù)說明
5.1.1 Meaning
支付寶對商戶提供的請求數(shù)據(jù)進行處理后,返回給商戶結(jié)果數(shù)據(jù),以便商戶根據(jù)這些數(shù)據(jù)進一步處理。
5.1.2 列表
表5-1 html同步返回參數(shù)說明
Parameters Parameter name Type (length scope) Parameter description Null or not Samples
Basic parameters
partner 合作者身份ID String(16) 商戶簽約的支付寶賬號對應(yīng)的支付寶唯一用戶號。
以2088開頭的16位純數(shù)字組成。 Not Full 2088101000137799
req_id 請求號 String(32) 用于關(guān)聯(lián)請求與響應(yīng),防止請求重播。
支付寶限制來自同一個partner的請求號必須唯一。 Not Full 1282889689836
sec_id 簽名方式 String 對參數(shù)簽名的方式。
取值范圍:
0001:RSA簽名算法
MD5:MD5簽名算法 Not Full MD5
service 接口名稱 String 接口名稱。 Not Full alipay.wap.trade.create.direct
v 接口版本號 String 接口版本號。
固定取值2.0。 Not Full 2.0
sign 簽名 String 對請求或響應(yīng)中參數(shù)簽名后的值。
請求失敗的請況下,不簽名,無此參數(shù)。 可空 72a64fb63f0b54f96b10cefb69319e8a
Business parameters
res_data 返回業(yè)務(wù)參數(shù) String 返回業(yè)務(wù)參數(shù),參見“5.1.2 1. res_data返回業(yè)務(wù)參數(shù)”。
請求成功后才會返回該值。
包含接口返回的最重要的授權(quán)令牌request_token。
<direct_trade_create_res>:請求根節(jié)點
<request_token>:授權(quán)令牌值 Full <?xmlversion="1.0" encoding="utf-8"?><direct_trade_create_res><request_token>20100830e8085e3e0868a466b822350ede5886e8</request_token></direct_trade_create_res>
res_error 返回錯誤參數(shù) String 返回錯誤參數(shù),參見“2. res_error返回錯誤參數(shù)”。
請求失敗后才會返回該值。
包含請求失敗的錯誤碼和錯誤原因。
<err>:返回錯誤根節(jié)點
<code>、<sub_code>:錯誤編碼(目前兩個值相同)
<msg>:錯誤信息 <detail>:錯誤詳細描述
參見“9.1 手機網(wǎng)頁即時到賬業(yè)務(wù)錯誤碼”。 Full <?xml version="1.0" encoding="utf-8"?><err><code>0005</code><sub_code>0005</sub_code><msg>partner illegal</msg><detail>合作伙伴沒有開通接口訪問權(quán)限</detail></err>
1. res_data返回業(yè)務(wù)參數(shù)
表5-2 res_data返回業(yè)務(wù)參數(shù)列表
Parameters Parameter name Type (length scope) Parameter description Null or not Samples
request_token 授權(quán)令牌 String 授權(quán)令牌,請求成功后才會返回該值。 Not Full 20100830e8085e3e0868a466b822350ede5886e8
2. res_error返回錯誤參數(shù)
表5-3 res_error返回錯誤參數(shù)列表
Parameters Parameter name 類型(長度范圍) Parameter description Null or not Samples
code 錯誤代碼 String 請求失敗時,返回的錯誤代碼,對應(yīng)“9.1 手機網(wǎng)頁即時到賬業(yè)務(wù)錯誤碼”中的“錯誤代碼(code)”。 Not Full 0005
sub_code 錯誤子代碼 String 預(yù)留參數(shù),目前和code參數(shù)值一致。 Not Full 0005
msg 錯誤原因 String 錯誤原因,對應(yīng)“9.1 手機網(wǎng)頁即時到賬業(yè)務(wù)錯誤碼”中的“錯誤原因(msg)”。 Not Full partner illegal
detail 錯誤詳細描述 String 錯誤詳細描述,對應(yīng)“9.1 手機網(wǎng)頁即時到賬業(yè)務(wù)錯誤碼”中的“錯誤詳細描述(detail)”。 Not Full 合作伙伴沒有開通接口訪問權(quán)限
5.1.3 Samples
正常輸出:
partner=2088101000137799&req_id=1282889689836&res_data=<?xmlversion="1.0" encoding="utf-8"?><direct_trade_create_res><request_token>20100830e8085e3e0868a466b822350ede5886e8</request_token></direct_trade_create_res>&sec_id=MD5&service=alipay.wap.trade.create.direct&v=2.0&sign=72a64fb63f0b54f96b10cefb69319e8a
發(fā)生錯誤時輸出:
partner=208810100013779&req_id=1282889689836&res_error=<?xml version="1.0" encoding="utf-8"?><err><code>0005</code><sub_code>0005</sub_code><msg>partner illegal</msg><detail>合作伙伴沒有開通接口訪問權(quán)限</detail></err>&sec_id=0001&service=alipay.wap.trade.create.direct&v=2.0
5.2 交易接口頁面跳轉(zhuǎn)同步通知參數(shù)說明
5.2.1 Meaning
After Alipay complete processing the request data of commercial users, it will notify the commercial user website through the way of automatic skipping of systemic controlling client end page. These processing result data is the page skipping synchronous notification parameter.
支付寶以GET方式訪問商戶網(wǎng)站(參數(shù)call_back_url,在“手機網(wǎng)頁即時到賬授權(quán)接口(alipay.wap.trade.create.direct)”中指定)。
5.2.2 List table
Table 5-4 Synchronous notification parameter description of page skipping
Parameters Parameter name Type (length scope) Parameter description Null or not Samples
sign Signature String 對請求或響應(yīng)中參數(shù)簽名后的值。 Not Full 49a330fee069465c64e561a25bf31c78
result 支付結(jié)果 String 判斷支付結(jié)果及交易狀態(tài)。
只有支付成功時(即result=success),才會跳轉(zhuǎn)到支付成功頁面,result有且只有success一個交易狀態(tài)。 Not Full success
out_trade_no 商戶網(wǎng)站唯一訂單號 String(64) 支付寶合作商戶網(wǎng)站唯一訂單號。 Not Full 1320742949342
trade_no 支付寶交易號 String(32) 該交易在支付寶系統(tǒng)中的交易流水號。
最短16位,最長64位。 Not Full 2011110823389231
request_token 授權(quán)令牌 String(40) 授權(quán)令牌,調(diào)用“手機網(wǎng)頁即時到賬授權(quán)接口(alipay.wap.trade.create.direct)”成功后返回的值。 Not Full 201008309e298cf01c58146274208eda1e4cdf2b
5.2.3 Samples
http://www.xxx.com/alipay/call_back_url.php?out_trade_no=1320742949342&request_token=201008309e298cf01c58146274208eda1e4cdf2b&result=success&trade_no=2011110823389231&sign=49a330fee069465c64e561a25bf31c78
說明:
本樣例僅供參考,實際網(wǎng)關(guān)為商戶域名。
如果支付失敗,直接跳轉(zhuǎn)“手機網(wǎng)頁即時到賬授權(quán)接口(alipay.wap.trade.create.direct)”中傳遞的merchant_url參數(shù),跳轉(zhuǎn)merchant_url時不回傳參數(shù)。
5.3 交易接口服務(wù)器異步通知參數(shù)說明
5.3.1 Meaning
支付寶對商戶的請求數(shù)據(jù)處理完成后,會將處理的結(jié)果數(shù)據(jù)通過服務(wù)器主動通知的方式通知給商戶網(wǎng)站。這些處理結(jié)果數(shù)據(jù)就是服務(wù)器異步通知參數(shù)。
5.3.2 List table
Table 5-5 Server asynchronous notification parameter description
Parameters Parameter name Type (field length) Parameter description Null or not Samples
Basic parameters
service 接口名稱 String 接口名稱。 Not Full alipay.wap.trade.create.direct
v 接口版本號 String 接口版本號。
固定取值1.0。 Not Full 1.0
sec_id Signature way String 對參數(shù)簽名的方式。
取值范圍:
0001:RSA簽名算法
MD5:MD5簽名算法 Not Full 0001
sign Signature String 對請求或響應(yīng)中參數(shù)簽名后的值。 Not Full Rw/y4ROnNicXhaj287Fiw5pvP6viSyg53H3iNiJ61D3YVi7zGniG2680pZv6rakMCeXX++q9XRLw8Rj6I1//qHrwMAHS1hViNW6hQYsh2TqemuL/xjXRCY3vjm1HCoZOUa5zF2jU09yG23MsMIUx2FAWCL/rgbcQcOjLe5FugTc=
Business parameters
notify_data 通知業(yè)務(wù)參數(shù) String 通知的業(yè)務(wù)參數(shù),參見“表5-6 notify_data通知業(yè)務(wù)參數(shù)列表”。
<notify>:通知根節(jié)點
<payment_type>:支付類型
<subject>:商品名稱
<trade_no>:支付寶交易號
<buyer_email>:買家支付寶賬號
<gmt_create>:交易創(chuàng)建時間
<notify_type>:通知類型
<quantity>:購買數(shù)量
<out_trade_no>:商戶網(wǎng)站唯一訂單號
<notify_time>:通知時間
<seller_id>:賣家支付寶賬戶號
<trade_status>:交易狀態(tài)
<is_total_fee_adjust>:是否調(diào)整總價
<total_fee>:交易金額
<gmt_payment>:交易付款時間
<seller_email>:賣家支付寶賬號
<gmt_close>:交易關(guān)閉時間
<price>:商品單價
<buyer_id>:買家支付寶用戶號
<notify_id>:通知校驗ID
<use_coupon>:是否使用紅包買家 Not Full <notify><payment_type>1</payment_type><subject>收銀臺{1283134629741}</subject><trade_no>2010083000136835</trade_no><buyer_email>[email protected]</buyer_email><gmt_create>2010-08-30 10:17:24</gmt_create><notify_type>trade_status_sync</notify_type><quantity>1</quantity><out_trade_no>1283134629741</out_trade_no><notify_time>2010-08-30 10:18:15</notify_time><seller_id>2088101000137799</seller_id><trade_status>TRADE_FINISHED</trade_status><is_total_fee_adjust>N</is_total_fee_adjust><total_fee>1.00</total_fee><gmt_payment>2010-08-30 10:18:26</gmt_payment><seller_email>[email protected]</seller_email><gmt_close>2010-08-30 10:18:26</gmt_close><price>1.00</price><buyer_id>2088102001172352</buyer_id><notify_id>509ad84678759176212c247c46bec05303</notify_id><use_coupon>N</use_coupon></notify>
表5-6 notify_data通知業(yè)務(wù)參數(shù)列表
Parameters Parameter name Type (field length) Parameter description Null or not Samples
payment_type 支付方式 String 用戶的支付方式:
1:商品購買;
4:捐贈。 Not Full 1
subject 商品名稱 String(256) 商品的標題/交易標題/訂單標題/訂單關(guān)鍵字等。
它在支付寶的交易明細中排在第一列,對于財務(wù)對賬尤為重要。是請求時對應(yīng)的參數(shù),原樣通知回來。 Not Full 收銀臺{1283134629741}
trade_no 支付寶交易號 String(32) 該交易在支付寶系統(tǒng)中的交易流水號。
最短16位,最長64位。 Not Full 2010083000136835
gmt_create 交易創(chuàng)建時間 String 該筆交易創(chuàng)建的時間。
格式為yyyy-MM-dd HH:mm:ss。 Not Full 2010-08-30 10:17:24
notify_type 通知類型 String 通知的類型。固定值。 Not Full trade_status_sync
quantity 購買數(shù)量 String 購買商品的數(shù)量。 Not Full 1
out_trade_no 商戶網(wǎng)站唯一訂單號 String(64) 對應(yīng)商戶網(wǎng)站的訂單系統(tǒng)中的唯一訂單號,非支付寶交易號。
需保證在商戶網(wǎng)站中的唯一性。是請求時對應(yīng)的參數(shù),原樣返回。 Not Full 1283134629741
notify_time 通知時間 String 通知的發(fā)送時間。
格式為yyyy-MM-dd HH:mm:ss。 Not Full 2010-08-30 10:18:15
seller_id 賣家支付寶用戶號 String 賣家支付寶賬號對應(yīng)的支付寶唯一用戶號。
以2088開頭的純16位數(shù)字。 Not Full 2088101000137799
trade_status 交易狀態(tài) String 交易的狀態(tài),取值范圍參見“9.2 交易狀態(tài)”。 Not Full TRADE_FINISHED
is_total_fee_adjust 是否調(diào)整總價 String 該交易是否調(diào)整過價格。
本接口創(chuàng)建的交易不會被修改總價,固定值為N。 Not Full N
total_fee 交易金額 String(15) 該筆訂單的總金額。
請求時對應(yīng)的參數(shù),原樣通知回來。 Not Full 1.00
gmt_payment 交易付款時間 String 該筆交易的買家付款時間。
格式為yyyy-MM-dd HH:mm:ss。
如果交易未付款,則不返回該參數(shù)。 Full 2010-08-30 10:18:26
gmt_close 交易關(guān)閉時間 String 交易關(guān)閉時間。
格式為yyyy-MM-dd HH:mm:ss。 Not Full 2010-08-30 10:18:26
price 商品單價 String 目前和total_fee值相同。
單位:元。
不應(yīng)低于0.01元。 Not Full 1.00
buyer_id 買家支付寶用戶號 String 買家支付寶賬號對應(yīng)的支付寶唯一用戶號。
以2088開頭的純16位數(shù)字。 Not Full 2088102001172352
notify_id 通知校驗ID String 通知校驗ID。唯一識別通知內(nèi)容。重發(fā)相同內(nèi)容的通知時,該值不變。 Not Full 509ad84678759176212c247c46bec05303
use_coupon 是否使用紅包買家 String 是否在交易過程中使用了紅包。 Not Full N
5.3.3 Samples
Note:
This sample is only for reference; the actual gateway shall be the commercial user domain name.
商戶使用RSA簽名時收到支付寶的通知請求樣例如下:
http://www.xxx.com/alipay/notify_url.php?service=alipay.wap.trade.create.direct&sign=Rw/y4ROnNicXhaj287Fiw5pvP6viSyg53H3iNiJ61D3YVi7zGniG2680pZv6rakMCeXX++q9XRLw8Rj6I1//qHrwMAHS1hViNW6hQYsh2TqemuL/xjXRCY3vjm1HCoZOUa5zF2jU09yG23MsMIUx2FAWCL/rgbcQcOjLe5FugTc=&sec_id=0001&v=2.0¬ify_data=g3ivqicRwI9rI5jgmSHSU2osBXV1jcxohapSAPjx4f6qiqsoAzstaRWuPuutE0gxQwzMOtwL3npZqWO3Z89J4w4dXIY/fvOLoTNn8FjExAf7OozoptUS6suBhdMyo/YJyS3lVALfCeT3s27pYWihHgQgna6cTfgi67H2MbX40xtexIpUnjgxBkmOLai8DPOUI58y4UrVwoXQgdcwnXsfn2OthhUFiFPfpINgEphUAq1nC/EPymP6ciHdTCWRI6l1BgWuCzdFy0MxJLliPSnuLyZTou7f+Z5Mw24FgOacaISB+1/G+c4XIJVKJwshCDw9Emz+NAWsPvq34FEEQXVAeQRDOphJx8bDqLK75CGZX+6fx88m5ztq4ykuRUcrmoxZLJ+PiABvYFzi5Yx2uBMP/PmknRmj1HUKEhuVWsXR0t6EWpJFXlyQA4uxbShzncWDigndD7wbfNtkNLg5xMSFFIKay+4YzJK68H9deW4xqk4JYTKsv8eom9Eg9MrJZiIrFkFpVYPuaw0y/n61UEFYdzEQZz+garCmMYehEAQCGibYUQXBlf1iwTOZdqJIxdgCpSX21MIa9N9jicmFu8OXWZJkdN+UrSyvIcpzRori+U6522ovMz5Z8EzVTfcUENu+d
注意:
以上示例中的notify_data參數(shù)值為加密內(nèi)容,商戶需用自己的RSA私鑰先進行解密后再驗簽。
商戶使用MD5簽名時收到支付寶的通知樣例如下:
http://www.xxx.com/alipay/notify_url.php?service=alipay.wap.trade.create.direct%20&sign=Rw/y4ROnNicXhaj287Fiw5pvP6viSyg53H3iNiJ61D3YVi7zGniG2680pZv6rakMCeXX++q9XRLw8Rj6I1//qHrwMAHS1hViNW6hQYsh2TqemuL/xjXRCY3vjm1HCoZOUa5zF2jU09yG23MsMIUx2FAWCL/rgbcQcOjLe5FugTc=&v=2.0&sec_id=MD5¬ify_data=%3Cnotify%3E%3Cpayment_type%3E1%3C/payment_type%3E%3Csubject%3E%E6%94%B6%E9%93%B6%E5%8F%B0{1283134629741}%3C/subject%3E%3Ctrade_no%3E2010083000136835%3C/trade_no%3E%3Cbuyer_email%[email protected]%3C/buyer_email%3E%3Cgmt_create%3E2010-08-3010:17:24%3C/gmt_create%3E%3Cnotify_type%3Etrade_status_sync%3C/notify_type%3E%3Cquantity%3E1%3C/quantity%3E%3Cout_trade_no%3E1283134629741%3C/out_trade_no%3E%3Cnotify_time%3E2010-08-3010:18:15%3C/notify_time%3E%3Cseller_id%3E2088101000137799%3C/seller_id%3E%3Ctrade_status%3ETRADE_FINISHED%3C/trade_status%3E%3Cis_total_fee_adjust%3EN%3C/is_total_fee_adjust%3E%3Ctotal_fee%3E1.00%3C/total_fee%3E%3Cgmt_payment%3E2010-08-3010:18:26%3C/gmt_payment%3E%3Cseller_email%[email protected]%3C/seller_email%3E%3Cgmt_close%3E2010-08-3010:18:26%3C/gmt_close%3E%3Cprice%3E1.00%3C/price%3E%3Cbuyer_id%3E2088102001172352%3C/buyer_id%3E%3Cnotify_id%3E509ad84678759176212c247c46bec05303%3C/notify_id%3E%3Cuse_coupon%3EN%3C/use_coupon%3E%3C/notify%3E
以上示例中的notify_data參數(shù)值為明文內(nèi)容,無需解密。
支付寶系統(tǒng)通知待簽名數(shù)據(jù)構(gòu)造規(guī)則比較特殊,為固定順序。
例如商戶收到如下通知數(shù)據(jù):
http://www.xxx.com/alipay/notify_url.php?service=alipay.wap.trade.create.direct&sign=Rw/y4ROnNicXhaj287Fiw5pvP6viSyg53H3iNiJ61D3YVi7zGniG2680pZv6rakMCeXX++q9XRLw8Rj6I1//qHrwMAHS1hViNW6hQYsh2TqemuL/xjXRCY3vjm1HCoZOUa5zF2jU09yG23MsMIUx2FAWCL/rgbcQcOjLe5FugTc=&v=1.0&sec_id=0001¬ify_data=<notify><payment_type>1</payment_type></notify>
則只需對以下數(shù)據(jù)進行驗簽:
service=alipay.wap.trade.create.direct&v=1.0&sec_id=0001¬ify_data=<notify>…</notify>
6 Notification returning data processing
6.1 html同步返回特性
(1) 支付寶處理完請求的數(shù)據(jù)后,當(dāng)前界面會自動刷新,立刻顯示處理結(jié)果;
(2) 處理一次請求,當(dāng)前界面只跳轉(zhuǎn)回來一次,即只返回一次處理結(jié)果;
(3) 由于沒有參數(shù)return_url來設(shè)置頁面跳轉(zhuǎn)同步通知頁面文件路徑,因此顯示處理結(jié)果的頁面文件所在位置是在支付寶的服務(wù)器中,即當(dāng)前頁面路徑地址是以支付寶的域名為開頭;
(4) 該步驟可在本機電腦調(diào)試,無需到服務(wù)器上;
(5) 處理結(jié)果顯示的格式是html格式;
(6) 可對這個html格式的處理結(jié)果進行html遠程解析,使之能在支付寶處理結(jié)果時獲取到相關(guān)處理結(jié)果數(shù)據(jù),并對這個結(jié)果界面進行商戶的業(yè)務(wù)邏輯處理;
(7) 本地電腦或商戶服務(wù)器的配置上需支持html遠程解析,如:需要支持SSL;
(8) 頁面跳轉(zhuǎn)后,瀏覽器地址欄中的鏈接僅在一分鐘內(nèi)有效,超過一分鐘該鏈接地址會失效,導(dǎo)致該頁面中商戶編寫的業(yè)務(wù)邏輯程序無法完成處理。
6.2 Page skipping synchronous notification page features
(1) After the buyer pays successfully, a page prompt of successful trading will be seen; this page stops for several seconds, then the page will automatically skip to the designated synchronous page of commercial users (Parameter “call_back_url”).
(2) The way of obtaining parameters at this page can be obtained in GET WAY, for example, request.QueryString("out_trade_no")、$_GET['out_trade_no'].
(3) This way only automatically skip after the buyer completes payment, only once.
(4) This way does not mean Alipay automatically recalling commercial users page, but Alipay program utilizes the function of page automatically skipping to make the user’s current page automatically skipping.
(5) This way can be debugged on the machine, but not on the server;
(6) Returning URL has only one-minute validity. The period more than one minute would make the link address invalid and the verification becomes failed.
(7) When setting up page-skipping synchronous notification page path (call_back_url), page document shall not added with self-defined parameter. For example:
Wrong format: http://www.alipay.com/alipay/return_url.php?xx=11
Correct format: http://www.alipay.com/alipay/return_url.php
(8) Alipay will check the legal validity of the domain name of synchronous notification page (call_back_url) of page skipping, thus when setting up page skipping synchronous notification page, the current computer domain shall not be set up. Special characters shall also not be affiliated with special characters (i.e. “!”), for example.
Wrong format:
http://localhost/alipay/return_url.php
http://localhost:80/alipay/return_url.php
http://www.xxx.com/alipay/return!url.do
Correct format:
Domain name addresses can be normally accessed: http://www.xxx.comalipay/return_url.php
IP addresses can be normally accessed: http://121.1.1.255/alipay/return_url.php
6.3 Page features of server asynchronous notification
(1) It is mandatory to guarantee that server asynchronous notification page (notify_url) does not have any characters, such as space, HTML label, and abnormal prompt information throwing in development system.
(2) Alipay uses POST way to send notification information, thus the way of obtaining parameters on the page like follows, request.Form("out_trade_no")、$_POST['out_trade_no'].
(3)Alipay actively issues notification. This way can be started.
(4) Only the trading is occurred in the transaction management of Alipay and change the trading status, Alipay can issue the server notification of the way (that is, Fastpay trading status “Waiting seller payment” default can not sent notification).
(5) Interaction between servers would not display on the page like page skipping synchronous notification. This interacting way is invisible.
(6) When changing the first trading status (the trading status is completed through trading in Fastpay), not only the page skipping synchronous notification can be started, but also server asynchronous notification page can receive the processing results notification sent by Alipay.
(7) After executing program, it is a must to print output “success”(不包含引號、前后無空格和其他多余字符). If the characters given feedback from the commercial users are not “Success”, the Alipay server would repeatedly issue notification, until it exceeds 24 hours 22 minutes. Generally, eight notification will be completed within 25 hours (the interval frequency of notification is 2m,10m,10m,1h,2h,6h,15h generally)
(8) After executing program, the page can not execute page skipping. If executing page skipping, Alipay can not receive “Success ” Character, it will be judged by Alipay server as abnormal page program and resending the notification of processing results.
(9) 程序處理過程中出現(xiàn)異常時返回“fail”,這時支付寶服務(wù)器會選擇重發(fā)通知。
(10) “cookies, session” would become invalid on this page, that is, these data can not be obtained.
(11) The debugging and running of the way must be on the server, that is, can access on Internet.
(12) The function of the way is aim to prevent order loss. That is, page skipping synchronous notification fails to process order upgrade, then it will process.
(13) When the commercial users receives the asynchronous notification of server and prints “success”, the synchronous notification parameter “notify_id” would become valid. That is to say, when Alipay sends a same asynchronous notification (including commercial users failed to print “success” causing Alipay repeatedly sending several times of notification), server asynchronous notification parameter “notify_id” is unchangeable.
(14) 異步通知在“交易成功”和“支付成功”狀態(tài)都會進行通知發(fā)送,需正確處理通知時的交易狀態(tài),處理完成之后都需返回“success”,避免出現(xiàn)重復(fù)通知可能導(dǎo)致的業(yè)務(wù)重復(fù)處理錯誤。
6.4 Triggering conditions of notification
Table 6-1 notification triggering conditions
Triggering conditions name Description of triggering conditions Default value of triggering conditions
TRADE_FINISHED Successful trading true(triggered notification)
TRADE_SUCCESS Successful payment true(triggered notification)
WAIT_BUYER_PAY Created trading false(untriggered notification )
TRADE_CLOSED Closed trading false(untriggered notification)
6.5 商戶業(yè)務(wù)處理注意事項
授權(quán)接口
當(dāng)支付寶處理完成后,支付寶會以html同步返回數(shù)據(jù)的形式,把數(shù)據(jù)反饋給商戶網(wǎng)站。商戶可以利用編程方法來模擬http請求遠程解析html獲得處理的結(jié)果數(shù)據(jù),增加商戶的業(yè)務(wù)邏輯處理程序。此時,商戶必須判斷商戶網(wǎng)站中是否已經(jīng)對該次的結(jié)果數(shù)據(jù)做過同樣處理。如果不判斷,存在潛在的風(fēng)險,商戶自行承擔(dān)因此而產(chǎn)生的所有損失。
交易接口
當(dāng)支付寶處理完成后,支付寶會把處理結(jié)果以當(dāng)前頁面跳轉(zhuǎn)同步通知和支付寶服務(wù)器主動通知商戶網(wǎng)站兩種形式,反饋給商戶網(wǎng)站。商戶可以從頁面跳轉(zhuǎn)同步通知頁面或者從服務(wù)器異步通知頁面中獲得這些信息,并且在驗證通過的判斷中增加商戶的業(yè)務(wù)邏輯處理程序。當(dāng)商戶有傳遞參數(shù)notify_url(服務(wù)器異步通知頁面路徑)或call_back_url(頁面跳轉(zhuǎn)同步通知頁面路徑)時,商戶必須判斷商戶網(wǎng)站中是否已經(jīng)對該次的通知結(jié)果數(shù)據(jù)做過同樣處理。如果不判斷,存在潛在的風(fēng)險,商戶自行承擔(dān)因此而產(chǎn)生的所有損失。
7 簽名機制
7.1 生成待簽名的字符串
7.1.1 需要參與簽名的參數(shù)
在請求參數(shù)列表中,除去sign參數(shù)外,其他需要使用到的參數(shù)皆是要簽名的參數(shù)。
在授權(quán)接口html返回參數(shù)列表中:
正常返回的情況下,除去sign參數(shù)外,凡是返回回來的參數(shù)皆是要簽名的參數(shù);
發(fā)生錯誤的情況下,不需要簽名。
在交易接口通知返回參數(shù)列表中,除去sign參數(shù)外,凡是通知返回回來的參數(shù)皆是要簽名的參數(shù)。
7.1.2 生成待簽名字符串
對于如下的參數(shù)數(shù)組:
授權(quán)接口
string[] parameters={
"service=alipay.wap.trade.create.direct",
"req_data=<direct_trade_create_req><subject>彩票
</subject><out_trade_no>1282889603601</out_trade_no><total_fee>10.01</total_fee><seller_account_name>[email protected]</seller_account_name><call_back_url>http://www.yoursite.com/waptest0504/servlet/CallBack</call_back_url><notify_url>http://www.yoursite.com/waptest0504/servlet/NotifyReceiver</notify_url><out_user>123456789</out_user><merchant_url>http://www.yoursite.com</merchant_url><pay_expire>3600</pay_expire></direct_trade_create_req>",
"partner=2088101000137799",
"req_id=1282889689836",
"sec_id=0001",
"format=xml ",
"v=2.0"
};
交易接口
string[] parameters={
"service=alipay.wap.auth.authAndExecute",
"req_data=<auth_and_execute_req><request_token>201008309e298cf01c58146274208eda1e4cdf2b</request_token></auth_and_execute_req>",
"partner=2088101000137799",
"sec_id=0001",
"format=xml",
"v=2.0",
};
對數(shù)組里的每一個值從a到z的順序排序,若遇到相同首字母,則看第二個字母,以此類推。
排序完成之后,再把所有數(shù)組值以“&”字符連接起來,如:
授權(quán)接口
format=xml&partner=2088101000137799&req_data=<direct_trade_create_req><subject>彩票</subject><out_trade_no>1282889603601</out_trade_no><total_fee>10.01</total_fee><seller_account_name>[email protected]</seller_account_name><call_back_url>http://www.yoursite.com/waptest0504/servlet/CallBack</call_back_url><notify_url>http://www.yoursite.com/waptest0504/servlet/NotifyReceiver</notify_url><out_user>123456789</out_user><merchant_url>http://www.yoursite.com</merchant_url><pay_expire>3600</pay_expire></direct_trade_create_req>&req_id=1282889689836&sec_id=0001&service=alipay.wap.trade.create.direct&v=2.0
交易接口
format=xml&partner=2088101000137799&req_data=<auth_and_execute_req><request_token>201008309e298cf01c58146274208eda1e4cdf2b</request_token></auth_and_execute_req>&sec_id=0001&service=alipay.wap.auth.authAndExecute&v=2.0
這串字符串便是待簽名字符串。
注意:
notify_url接受到的參數(shù)驗簽不要排序,只需要按照支付寶返回的參數(shù)順序,組裝字符串,然后驗簽,如支付寶異步通知POST方式返回的參數(shù)順序如下:service=alipay.wap.trade.create.direct&v=1.0&sec_id=0001¬ify_data=<notify>…</notify>
沒有值的參數(shù)無需傳遞,也無需包含到待簽名數(shù)據(jù)中;
簽名時將字符轉(zhuǎn)化成字節(jié)流時指定的字符集與_input_charset保持一致;
如果傳遞了_input_charset參數(shù),這個參數(shù)也應(yīng)該包含在待簽名數(shù)據(jù)中;
根據(jù)HTTP協(xié)議要求,傳遞參數(shù)的值中如果存在特殊字符(如:&、@等),那么該值需要做URL Encoding,這樣請求接收方才能接收到正確的參數(shù)值。這種情況下,待簽名數(shù)據(jù)應(yīng)該是原始值而不是encoding之后的值。例如:調(diào)用某接口需要對請求參數(shù)email進行數(shù)字簽名,那么待簽名數(shù)據(jù)應(yīng)該是[email protected],而不是email=test%40msn.com。
7.2 簽名
7.2.1 MD5簽名
在MD5簽名時,需要私鑰參與簽名。MD5的私鑰是以英文字母和數(shù)字組成的32位字符串。商戶可登錄到商戶服務(wù)中心(https://b.alipay.com),安裝數(shù)字證書,在“技術(shù)服務(wù)”欄目中點擊“交易安全校驗碼”,即可查看。
請求時簽名
當(dāng)拿到請求時的待簽名字符串后,需要把私鑰直接拼接到待簽名字符串后面,形成新的字符串,利用MD5的簽名函數(shù)對這個新的字符串進行簽名運算,從而得到32位簽名結(jié)果字符串(該字符串賦值于參數(shù)sign)。
通知返回時驗證簽名
當(dāng)獲得到通知返回時的待簽名字符串后,同理,需要把私鑰直接拼接到待簽名字符串后面,形成新的字符串,利用MD5的簽名函數(shù)對這個新的字符串進行簽名運算,從而得到32位簽名結(jié)果字符串。此時這個新的字符串需要與支付寶通知返回參數(shù)中的參數(shù)sign的值進行驗證是否相等,來判斷簽名是否驗證通過。
7.2.2 DSA、RSA簽名
在DSA或RSA的簽名時,需要私鑰和公鑰一起參與簽名。私鑰與公鑰皆是客戶通過OPENSSL來生成得出的。客戶把生成出的公鑰與支付寶技術(shù)人員配置好的支付寶公鑰做交換。因此,在簽名時,客戶要用到的是客戶的私鑰及支付寶的公鑰。
請求時簽名
當(dāng)拿到請求時的待簽名字符串后,把待簽名字符串與客戶的私鑰一同放入DSA或RSA的簽名函數(shù)中進行簽名運算,從而得到簽名結(jié)果字符串。
解密
當(dāng)獲得到通知返回時的原始數(shù)據(jù)后,首先要對加密的參數(shù)做解密。
在授權(quán)接口中,要解密的返回參數(shù)是“res_data”。
在交易接口中,要解密的返回參數(shù)是“notify_data”。
即把res_data或notify_data、商戶私鑰一同放入RSA的解密函數(shù)中進行解密運算,從而得到解密結(jié)果字符串。
通知返回時驗證簽名
當(dāng)獲得到通知返回時的待簽名字符串后,把待簽名字符串、支付寶提供的公鑰、支付寶通知返回參數(shù)中的參數(shù)sign的值三者一同放入DSA或RSA的簽名函數(shù)中進行非對稱的簽名運算,來判斷簽名是否驗證通過。
8 建議與意見
如果您在閱讀技術(shù)文檔時有任何建議和意見,請點擊下面的鏈接跟帖回復(fù),我們將根據(jù)您的反饋完善文檔內(nèi)容。
http://club.alipay.com/read.php?tid=8684674&fid=703
9 附錄
9.1 手機網(wǎng)頁即時到賬業(yè)務(wù)錯誤碼
表9-1 手機網(wǎng)頁即時到賬業(yè)務(wù)錯誤碼
錯誤代碼(code) 錯誤原因(msg) 錯誤詳細描述(detail) 含義
0000 system exception 系統(tǒng)異常 系統(tǒng)異常
0001 common params illegal 通用參數(shù)中少了如service、partner等必填參數(shù) 缺少必要的參數(shù),請檢查非空參數(shù)是否已傳遞
0002 sign illegal 簽名不正確 簽名錯誤,請檢查簽名的參數(shù)是否符合支付寶簽名規(guī)范
0003 service not exist 不存在對應(yīng)的service 服務(wù)接口錯誤,請檢查service是否傳遞正確
0004 req_data illegal req_data沒有按照<req>…<req>格式要求填寫 req_data格式不正確
0005 partner illegal 合作伙伴沒有開通接口訪問權(quán)限 商戶未開通接口權(quán)限或合同已過期
0006 sec_id not exist 不存在對應(yīng)的sec_id sec_id(簽名算法)不正確,支持0001(RSA)和MD5
0007 biz params illegal 缺少了非空的業(yè)務(wù)參數(shù) 缺少非空業(yè)務(wù)參數(shù)
0008 biz params too long 業(yè)務(wù)參數(shù)超出長度限制 業(yè)務(wù)參數(shù)超出長度限制
0009 seller_account_not_match 賣家賬號不匹配 商戶不在受限列表中
9.2 交易狀態(tài)
表9-2 交易狀態(tài)
枚舉名稱 枚舉說明
WAIT_BUYER_PAY 交易創(chuàng)建,等待買家付款。
TRADE_CLOSED 在指定時間段內(nèi)未支付時關(guān)閉的交易;
在交易完成全額退款成功時關(guān)閉的交易。
TRADE_SUCCESS 交易成功,且可對該交易做操作,如:多級分潤、退款等。
TRADE_PENDING 等待賣家收款(買家付款后,如果賣家賬號被凍結(jié))。
TRADE_FINISHED 交易成功且結(jié)束,即不可再做任何操作
世聯(lián)翻譯-讓世界自由溝通!專業(yè)的全球語言翻譯供應(yīng)商,上海翻譯公司專業(yè)品牌。絲路沿線56種語言一站式翻譯與技術(shù)解決方案,專業(yè)英語翻譯、日語翻譯等文檔翻譯、同傳口譯、視頻翻譯、出國外派服務(wù),加速您的全球交付。
世聯(lián)翻譯公司在北京、上海、深圳等國際交往城市設(shè)有翻譯基地,業(yè)務(wù)覆蓋全國城市。每天有近百萬字節(jié)的信息和貿(mào)易通過世聯(lián)走向全球!積累了大量政商用戶數(shù)據(jù),翻譯人才庫數(shù)據(jù),多語種語料庫大數(shù)據(jù)。世聯(lián)品牌和服務(wù)品質(zhì)已得到政務(wù)防務(wù)和國際組織、跨國公司和大中型企業(yè)等近萬用戶的認可。 |