国产精品人人爱一区二区白浆_国产我不卡午夜伦理_免费电影亚洲一级黄片_国产午夜福利久久_51视频在线观看免费国产_天堂AV网手机版_国产精品毛片一区二_印度女人性液_日韩大片91免费观看视频播放_日本欧美国产精品第一页久久

手機(jī)版
1 2 3 4
首頁 > 新聞中心 > 行業(yè)新聞 >
行業(yè)新聞

上海翻譯公司完成電子系統(tǒng)“即時(shí)到賬接口 ”中文翻譯

發(fā)布時(shí)間:2019-08-28 16:08  點(diǎn)擊:

上海翻譯公司完成電子系統(tǒng)“即時(shí)到賬接口 ”中文翻譯
手機(jī)網(wǎng)頁即時(shí)到賬接口 
服務(wù)名稱: alipay.wap.trade.create.direct alipay.wap.auth.authAndExecute 
版本號(hào):1.2 
支付寶(中國)網(wǎng)絡(luò)技術(shù)有限公司 版權(quán)所有
1 Document description 
1.1 Function Description 
“手機(jī)網(wǎng)頁即時(shí)到賬授權(quán)接口(alipay.wap.trade.create.direct)”和“手機(jī)網(wǎng)頁即時(shí)到賬交易接口(alipay.wap.auth.authAndExecute)”配套使用,共同完成即時(shí)到賬交易。 
授權(quán)接口用于存儲(chǔ)商戶創(chuàng)建交易所需信息,并返回一個(gè)授權(quán)令牌(request_token);交易接口使用授權(quán)接口返回的授權(quán)令牌(request_token)值,將頁面重定向到支付寶支付頁面,使得付款者可以直接匯款給另一個(gè)擁有支付寶賬號(hào)的收款者。 
授權(quán)接口并未實(shí)際創(chuàng)建即時(shí)到賬交易,創(chuàng)建即時(shí)到賬交易并且完成支付的過程由交易接口完成。 
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é)、賬號(hào)被凍結(jié)、訂單已支付、訂單金額和支付金額不一致等都會(huì)導(dǎo)致支付失敗。 
 
2 Function demonstration
 
圖2-1 手機(jī)網(wǎng)頁即時(shí)到賬業(yè)務(wù)流程圖
步驟1: 獲取token授權(quán)令牌 
商戶調(diào)用“手機(jī)網(wǎng)頁即時(shí)到賬授權(quán)接口(alipay.wap.trade.create.direct)”,向支付寶發(fā)送訂單信息,以獲取token授權(quán)令牌。 
步驟2: 即時(shí)到賬交易付款 
商戶調(diào)用“手機(jī)網(wǎng)頁即時(shí)到賬交易接口(alipay.wap.auth.authAndExecute)”,驗(yàn)證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)造請(qǐng)求數(shù)據(jù) Structure request data
發(fā)送請(qǐng)求數(shù)據(jù) Issuing requirement data
請(qǐng)求的交易 Requested transaction 
返回相應(yīng)數(shù)據(jù) Return he corresponding data 
對(duì)相應(yīng)的數(shù)據(jù)進(jìn)行處理 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)接口
支付寶會(huì)把處理完成的結(jié)果數(shù)據(jù)以html的形式返回給商戶。 
交易接口
As for the transaction after completing processing, Alipay will give feedback to commercial user website in the following ways.
程序上自動(dòng)進(jìn)行重新構(gòu)造URL地址鏈接,在用戶當(dāng)前頁面上通過自動(dòng)跳轉(zhuǎn)的方式跳回商戶在請(qǐng)求時(shí)設(shè)定好的頁面路徑地址(參數(shù)call_back_url,在“手機(jī)網(wǎng)頁即時(shí)到賬授權(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請(qǐng)求遠(yuǎn)程解析html,獲取支付寶返回的結(jié)果數(shù)據(jù)后,可以結(jié)合自身網(wǎng)站的業(yè)務(wù)邏輯進(jìn)行數(shù)據(jù)處理。 
交易接口
商戶在同步通知處理頁面(參數(shù)call_back_url指定頁面文件)或服務(wù)器異步通知頁面(參數(shù)notify_url指定頁面文件)獲取支付寶返回的結(jié)果數(shù)據(jù)后,可以結(jié)合自身網(wǎng)站的業(yè)務(wù)邏輯進(jìn)行數(shù)據(jù)處理(如:訂單更新、自動(dòng)充值到會(huì)員賬號(hào)中等)。 
4 Request parameters
4.1 授權(quán)接口請(qǐng)求參數(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  請(qǐng)求參數(shù)格式  String 請(qǐng)求參數(shù)格式。 
固定取值xml。  Not Full xml 
接口版本號(hào)  String  接口版本號(hào)。 
固定取值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  請(qǐng)求號(hào)  String(32)  用于關(guān)聯(lián)請(qǐng)求與響應(yīng),防止請(qǐng)求重播。 
支付寶限制來自同一個(gè)partner的請(qǐng)求號(hào)必須唯一。  Not Full 1282889689836 
sec_id  簽名方式  對(duì)參數(shù)簽名的方式。 
取值范圍: 
0001:RSA簽名算法 
MD5:MD5簽名算法 
Not Full 0001
sign  簽名  String  對(duì)請(qǐng)求或響應(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  請(qǐng)求業(yè)務(wù)參數(shù)  String  請(qǐng)求業(yè)務(wù)參數(shù)請(qǐng)參考“表4-2 req_data請(qǐng)求業(yè)務(wù)參數(shù)列表”。 
<direct_trade_create_req>:根節(jié)點(diǎn) 
<subject>:商品名稱 
<out_trade_no>:商戶網(wǎng)站唯一訂單號(hào) 
<total_fee>:交易金額
<seller_account_name>:賣家支付寶賬號(hào)
<call_back_url>:支付成功跳轉(zhuǎn)頁面路徑 
<notify_url>:服務(wù)器異步通知頁面路徑
<out_user>:商戶系統(tǒng)用戶唯一標(biāo)識(shí) 
<merchant_url>:操作中斷返回地址 
<pay_expire>:交易自動(dòng)關(guān)閉時(shí)間 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請(qǐng)求業(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ù)點(diǎn)后兩位。  Not Full 10.01 
seller_account_name  Seller Alipay account String(100)  賣家的支付寶賬號(hào)。交易成功后,買家資金會(huì)轉(zhuǎn)移到該賬戶中。 Not Full [email protected] 
call_back_url  支付成功跳轉(zhuǎn)頁面路徑  String(200)  支付成功后的跳轉(zhuǎn)頁面鏈接。 
支付成功才會(huì)跳轉(zhuǎn)。  Not Full http://www.yoursite.com/waptest0504/servlet/CallBack 
notify_url  服務(wù)器異步通知頁面路徑  String(200)  支付寶服務(wù)器主動(dòng)通知商戶網(wǎng)站里指定的頁面http路徑。  Full http://www.yoursite.com/waptest0504/servlet/NotifyReceiver 
out_user  商戶系統(tǒng)用戶唯一標(biāo)識(shí)  String(32)  買家在商戶系統(tǒng)的唯一標(biāo)識(shí)。 
當(dāng)該買家支付成功一次后,再次支付金額在30元內(nèi)時(shí),不需要再次輸入密碼。 Full 123456789 
merchant_url  操作中斷返回地址  String  用戶付款中途退出返回商戶的地址。  Full http://www.yoursite.com 
pay_expire  交易自動(dòng)關(guān)閉時(shí)間  String  交易自動(dòng)關(guān)閉時(shí)間,單位為分鐘。 
默認(rèn)值21600(即15天)。 Full 3600 
 
說明:
req_data參數(shù)的值不能包含半角或全角的“&”符號(hào);
部分參數(shù)類型為String,未指明長度范圍,表明系統(tǒng)不校驗(yàn)該參數(shù)的長度。 
4.1.3 Samples 
說明:􀁺 
本樣例僅供參考,支付寶網(wǎng)關(guān)為http://wappaygw.alipay.com/service/rest.htm。
藍(lán)色為必填參數(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 交易接口請(qǐng)求參數(shù)說明 
4.2.1 Meaning 
請(qǐng)求參數(shù)是商戶在與支付寶進(jìn)行數(shù)據(jù)交互時(shí),提供給支付寶的請(qǐng)求數(shù)據(jù),以便支付寶根據(jù)這些數(shù)據(jù)進(jìn)一步處理。 
4.2.2 列表 
表4-3 請(qǐng)求參數(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  請(qǐng)求參數(shù)格式  String  請(qǐng)求參數(shù)格式。 
固定取值xml。  Not Full xml 
接口版本號(hào)  String  接口版本號(hào)。 
固定取值2.0。  Not Full 2.0 
partner  合作者身份ID  String(16)  商戶簽約的支付寶賬號(hào)對(duì)應(yīng)的支付寶唯一用戶號(hào)。 
以2088開頭的16位純數(shù)字組成。  Not Full 2088101000137799 
sec_id  簽名方式  String  對(duì)參數(shù)簽名的方式。 
取值范圍:
0001:RSA簽名算法 
MD5:MD5簽名算法  Not Full 0001 
sign  簽名  String  對(duì)請(qǐng)求或響應(yīng)中參數(shù)簽名后的值。  Not Full LdXbwMLug8E4UjfJMuYv2KoD5X5F3vHGQsQbZ/rdEQ3eaN4FPal7rhsbZZ/+ZUL1kAKzTQSDdMk87MEWtWO1Yq6rhnt2Tv8Hh6Hb16211VXKgbBCpq861+LopRwegPbGStcwBuAyE4pi6fYlJ6gxzL4tMyeLe+T5XZ0RKRUk00U= 
Business parameters
req_data  請(qǐng)求業(yè)務(wù)參數(shù)  String  請(qǐng)求業(yè)務(wù)參數(shù)請(qǐng)參考“表4-4 req_data請(qǐng)求業(yè)務(wù)參數(shù)列表”。 
<auth_and_execute_req>:根節(jié)點(diǎn) 
<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)用“手機(jī)網(wǎng)頁即時(shí)到賬授權(quán)接口(alipay.wap.trade.create.direct)”成功后返回該值。此參數(shù)值不能更改。  Not Full 201008309e298cf01c58146274208eda1e4cdf2b 
 
說明: 
只有支付成功時(shí)才會(huì)跳轉(zhuǎn)到call_back_url,支付失敗時(shí)跳轉(zhuǎn)到merchant_url(不返回任何參數(shù)),跳轉(zhuǎn)地址都在“手機(jī)網(wǎng)頁即時(shí)到賬授權(quán)接口(alipay.wap.trade.create.direct)”中設(shè)置。
部分參數(shù)類型為String,未指明長度范圍,表明系統(tǒng)不校驗(yàn)該參數(shù)的長度。
4.2.3 Samples
說明: 
本樣例僅供參考,支付寶網(wǎng)關(guān)為http://wappaygw.alipay.com/service/rest.htm。
所有參數(shù)都必傳,藍(lán)色為可變值參數(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 
支付寶對(duì)商戶提供的請(qǐng)求數(shù)據(jù)進(jìn)行處理后,返回給商戶結(jié)果數(shù)據(jù),以便商戶根據(jù)這些數(shù)據(jù)進(jìn)一步處理。 
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)  商戶簽約的支付寶賬號(hào)對(duì)應(yīng)的支付寶唯一用戶號(hào)。 
以2088開頭的16位純數(shù)字組成。  Not Full 2088101000137799 
req_id  請(qǐng)求號(hào)  String(32)  用于關(guān)聯(lián)請(qǐng)求與響應(yīng),防止請(qǐng)求重播。 
支付寶限制來自同一個(gè)partner的請(qǐng)求號(hào)必須唯一。  Not Full 1282889689836 
sec_id  簽名方式  String  對(duì)參數(shù)簽名的方式。 
取值范圍: 
0001:RSA簽名算法
MD5:MD5簽名算法 Not Full MD5 
service  接口名稱  String  接口名稱。  Not Full alipay.wap.trade.create.direct 
接口版本號(hào)  String  接口版本號(hào)。 
固定取值2.0。  Not Full 2.0 
sign 簽名 String 對(duì)請(qǐng)求或響應(yīng)中參數(shù)簽名后的值。 
請(qǐng)求失敗的請(qǐng)況下,不簽名,無此參數(shù)。 可空 72a64fb63f0b54f96b10cefb69319e8a
Business parameters
res_data  返回業(yè)務(wù)參數(shù)  String  返回業(yè)務(wù)參數(shù),參見“5.1.2 1. res_data返回業(yè)務(wù)參數(shù)”。 
請(qǐng)求成功后才會(huì)返回該值。 
包含接口返回的最重要的授權(quán)令牌request_token。 
<direct_trade_create_res>:請(qǐng)求根節(jié)點(diǎn) 
<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  返回錯(cuò)誤參數(shù)  String  返回錯(cuò)誤參數(shù),參見“2. res_error返回錯(cuò)誤參數(shù)”。
請(qǐng)求失敗后才會(huì)返回該值。 
包含請(qǐng)求失敗的錯(cuò)誤碼和錯(cuò)誤原因。 
<err>:返回錯(cuò)誤根節(jié)點(diǎn) 
<code>、<sub_code>:錯(cuò)誤編碼(目前兩個(gè)值相同)
<msg>:錯(cuò)誤信息  <detail>:錯(cuò)誤詳細(xì)描述 
參見“9.1 手機(jī)網(wǎng)頁即時(shí)到賬業(yè)務(wù)錯(cuò)誤碼”。  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)令牌,請(qǐng)求成功后才會(huì)返回該值。  Not Full 20100830e8085e3e0868a466b822350ede5886e8 
 
2. res_error返回錯(cuò)誤參數(shù) 
 
表5-3 res_error返回錯(cuò)誤參數(shù)列表
Parameters Parameter name 類型(長度范圍)  Parameter description Null or not Samples
code  錯(cuò)誤代碼  String  請(qǐng)求失敗時(shí),返回的錯(cuò)誤代碼,對(duì)應(yīng)“9.1 手機(jī)網(wǎng)頁即時(shí)到賬業(yè)務(wù)錯(cuò)誤碼”中的“錯(cuò)誤代碼(code)”。  Not Full 0005 
sub_code  錯(cuò)誤子代碼  String  預(yù)留參數(shù),目前和code參數(shù)值一致。  Not Full 0005 
msg  錯(cuò)誤原因  String  錯(cuò)誤原因,對(duì)應(yīng)“9.1 手機(jī)網(wǎng)頁即時(shí)到賬業(yè)務(wù)錯(cuò)誤碼”中的“錯(cuò)誤原因(msg)”。  Not Full partner illegal 
detail  錯(cuò)誤詳細(xì)描述  String  錯(cuò)誤詳細(xì)描述,對(duì)應(yīng)“9.1 手機(jī)網(wǎng)頁即時(shí)到賬業(yè)務(wù)錯(cuò)誤碼”中的“錯(cuò)誤詳細(xì)描述(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ā)生錯(cuò)誤時(shí)輸出: 
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,在“手機(jī)網(wǎng)頁即時(shí)到賬授權(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  對(duì)請(qǐng)求或響應(yīng)中參數(shù)簽名后的值。  Not Full 49a330fee069465c64e561a25bf31c78 
result  支付結(jié)果  String  判斷支付結(jié)果及交易狀態(tài)。 
只有支付成功時(shí)(即result=success),才會(huì)跳轉(zhuǎn)到支付成功頁面,result有且只有success一個(gè)交易狀態(tài)。  Not Full success 
out_trade_no  商戶網(wǎng)站唯一訂單號(hào)  String(64)  支付寶合作商戶網(wǎng)站唯一訂單號(hào)。  Not Full 1320742949342 
trade_no  支付寶交易號(hào)  String(32)  該交易在支付寶系統(tǒng)中的交易流水號(hào)。 
最短16位,最長64位。  Not Full 2011110823389231 
request_token  授權(quán)令牌  String(40)  授權(quán)令牌,調(diào)用“手機(jī)網(wǎng)頁即時(shí)到賬授權(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 
說明: 
本樣例僅供參考,實(shí)際網(wǎng)關(guān)為商戶域名。
如果支付失敗,直接跳轉(zhuǎn)“手機(jī)網(wǎng)頁即時(shí)到賬授權(quán)接口(alipay.wap.trade.create.direct)”中傳遞的merchant_url參數(shù),跳轉(zhuǎn)merchant_url時(shí)不回傳參數(shù)。 
 
5.3 交易接口服務(wù)器異步通知參數(shù)說明 
5.3.1 Meaning 
支付寶對(duì)商戶的請(qǐng)求數(shù)據(jù)處理完成后,會(huì)將處理的結(jié)果數(shù)據(jù)通過服務(wù)器主動(dòng)通知的方式通知給商戶網(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 
接口版本號(hào)  String  接口版本號(hào)。 
固定取值1.0。  Not Full 1.0 
sec_id  Signature way String  對(duì)參數(shù)簽名的方式。 
取值范圍: 
0001:RSA簽名算法
MD5:MD5簽名算法  Not Full 0001 
sign  Signature String  對(duì)請(qǐng)求或響應(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é)點(diǎn) 
<payment_type>:支付類型 
<subject>:商品名稱 
<trade_no>:支付寶交易號(hào)
<buyer_email>:買家支付寶賬號(hào) 
<gmt_create>:交易創(chuàng)建時(shí)間 
<notify_type>:通知類型 
<quantity>:購買數(shù)量 
<out_trade_no>:商戶網(wǎng)站唯一訂單號(hào) 
<notify_time>:通知時(shí)間 
<seller_id>:賣家支付寶賬戶號(hào)
<trade_status>:交易狀態(tài)
<is_total_fee_adjust>:是否調(diào)整總價(jià) 
<total_fee>:交易金額 
<gmt_payment>:交易付款時(shí)間 
<seller_email>:賣家支付寶賬號(hào) 
<gmt_close>:交易關(guān)閉時(shí)間 
<price>:商品單價(jià) 
<buyer_id>:買家支付寶用戶號(hào) 
<notify_id>:通知校驗(yàn)ID 
<use_coupon>:是否使用紅包買家 Not Full <notify><payment_type>1</payment_type><subject>收銀臺(tái){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:捐贈(zèng)。 Not Full
subject  商品名稱  String(256)  商品的標(biāo)題/交易標(biāo)題/訂單標(biāo)題/訂單關(guān)鍵字等。 
它在支付寶的交易明細(xì)中排在第一列,對(duì)于財(cái)務(wù)對(duì)賬尤為重要。是請(qǐng)求時(shí)對(duì)應(yīng)的參數(shù),原樣通知回來。  Not Full 收銀臺(tái){1283134629741} 
trade_no  支付寶交易號(hào)  String(32)  該交易在支付寶系統(tǒng)中的交易流水號(hào)。 
最短16位,最長64位。  Not Full 2010083000136835 
buyer_email  買家支付寶賬號(hào)  String(100)  買家支付寶賬號(hào),可以是email或手機(jī)號(hào)碼。  Not Full [email protected] 
gmt_create  交易創(chuàng)建時(shí)間  String  該筆交易創(chuàng)建的時(shí)間。 
格式為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
out_trade_no  商戶網(wǎng)站唯一訂單號(hào)  String(64)  對(duì)應(yīng)商戶網(wǎng)站的訂單系統(tǒng)中的唯一訂單號(hào),非支付寶交易號(hào)。 
需保證在商戶網(wǎng)站中的唯一性。是請(qǐng)求時(shí)對(duì)應(yīng)的參數(shù),原樣返回。  Not Full 1283134629741 
notify_time  通知時(shí)間  String  通知的發(fā)送時(shí)間。 
格式為yyyy-MM-dd HH:mm:ss。  Not Full 2010-08-30 10:18:15 
seller_id  賣家支付寶用戶號(hào)  String  賣家支付寶賬號(hào)對(duì)應(yīng)的支付寶唯一用戶號(hào)。 
以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)整總價(jià)  String  該交易是否調(diào)整過價(jià)格。 
本接口創(chuàng)建的交易不會(huì)被修改總價(jià),固定值為N。  Not Full
total_fee  交易金額  String(15)  該筆訂單的總金額。 
請(qǐng)求時(shí)對(duì)應(yīng)的參數(shù),原樣通知回來。  Not Full 1.00 
gmt_payment  交易付款時(shí)間  String  該筆交易的買家付款時(shí)間。
格式為yyyy-MM-dd HH:mm:ss。 
如果交易未付款,則不返回該參數(shù)。  Full 2010-08-30 10:18:26 
seller_email  賣家支付寶賬號(hào)  String(100)  賣家支付寶賬號(hào),可以是email和手機(jī)號(hào)碼。  Not Full [email protected] 
gmt_close  交易關(guān)閉時(shí)間  String  交易關(guān)閉時(shí)間。 
格式為yyyy-MM-dd HH:mm:ss。  Not Full 2010-08-30 10:18:26 
price  商品單價(jià)  String  目前和total_fee值相同。 
單位:元。 
不應(yīng)低于0.01元。  Not Full 1.00 
buyer_id  買家支付寶用戶號(hào)  String  買家支付寶賬號(hào)對(duì)應(yīng)的支付寶唯一用戶號(hào)。 
以2088開頭的純16位數(shù)字。  Not Full 2088102001172352 
notify_id  通知校驗(yàn)ID  String  通知校驗(yàn)ID。唯一識(shí)別通知內(nèi)容。重發(fā)相同內(nèi)容的通知時(shí),該值不變。  Not Full 509ad84678759176212c247c46bec05303 
use_coupon  是否使用紅包買家  String  是否在交易過程中使用了紅包。  Not Full
 
5.3.3 Samples 
Note:
This sample is only for reference; the actual gateway shall be the commercial user domain name.
商戶使用RSA簽名時(shí)收到支付寶的通知請(qǐng)求樣例如下: 
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&notify_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私鑰先進(jìn)行解密后再驗(yàn)簽。 
商戶使用MD5簽名時(shí)收到支付寶的通知樣例如下: 
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&notify_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&notify_data=<notify><payment_type>1</payment_type></notify> 
則只需對(duì)以下數(shù)據(jù)進(jìn)行驗(yàn)簽: 
service=alipay.wap.trade.create.direct&v=1.0&sec_id=0001&notify_data=<notify>…</notify> 
6 Notification returning data processing 
6.1 html同步返回特性 
(1) 支付寶處理完請(qǐng)求的數(shù)據(jù)后,當(dāng)前界面會(huì)自動(dòng)刷新,立刻顯示處理結(jié)果; 
(2) 處理一次請(qǐng)求,當(dāng)前界面只跳轉(zhuǎn)回來一次,即只返回一次處理結(jié)果; 
(3) 由于沒有參數(shù)return_url來設(shè)置頁面跳轉(zhuǎn)同步通知頁面文件路徑,因此顯示處理結(jié)果的頁面文件所在位置是在支付寶的服務(wù)器中,即當(dāng)前頁面路徑地址是以支付寶的域名為開頭; 
(4) 該步驟可在本機(jī)電腦調(diào)試,無需到服務(wù)器上; 
(5) 處理結(jié)果顯示的格式是html格式; 
(6) 可對(duì)這個(gè)html格式的處理結(jié)果進(jìn)行html遠(yuǎn)程解析,使之能在支付寶處理結(jié)果時(shí)獲取到相關(guān)處理結(jié)果數(shù)據(jù),并對(duì)這個(gè)結(jié)果界面進(jìn)行商戶的業(yè)務(wù)邏輯處理; 
(7) 本地電腦或商戶服務(wù)器的配置上需支持html遠(yuǎn)程解析,如:需要支持SSL; 
(8) 頁面跳轉(zhuǎn)后,瀏覽器地址欄中的鏈接僅在一分鐘內(nèi)有效,超過一分鐘該鏈接地址會(huì)失效,導(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”(不包含引號(hào)、前后無空格和其他多余字符). 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)異常時(shí)返回“fail”,這時(shí)支付寶服務(wù)器會(huì)選擇重發(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)都會(huì)進(jìn)行通知發(fā)送,需正確處理通知時(shí)的交易狀態(tài),處理完成之后都需返回“success”,避免出現(xiàn)重復(fù)通知可能導(dǎo)致的業(yè)務(wù)重復(fù)處理錯(cuò)誤。 
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ù)處理注意事項(xiàng) 
授權(quán)接口
當(dāng)支付寶處理完成后,支付寶會(huì)以html同步返回?cái)?shù)據(jù)的形式,把數(shù)據(jù)反饋給商戶網(wǎng)站。商戶可以利用編程方法來模擬http請(qǐng)求遠(yuǎn)程解析html獲得處理的結(jié)果數(shù)據(jù),增加商戶的業(yè)務(wù)邏輯處理程序。此時(shí),商戶必須判斷商戶網(wǎng)站中是否已經(jīng)對(duì)該次的結(jié)果數(shù)據(jù)做過同樣處理。如果不判斷,存在潛在的風(fēng)險(xiǎn),商戶自行承擔(dān)因此而產(chǎn)生的所有損失。 
交易接口 
當(dāng)支付寶處理完成后,支付寶會(huì)把處理結(jié)果以當(dāng)前頁面跳轉(zhuǎn)同步通知和支付寶服務(wù)器主動(dòng)通知商戶網(wǎng)站兩種形式,反饋給商戶網(wǎng)站。商戶可以從頁面跳轉(zhuǎn)同步通知頁面或者從服務(wù)器異步通知頁面中獲得這些信息,并且在驗(yàn)證通過的判斷中增加商戶的業(yè)務(wù)邏輯處理程序。當(dāng)商戶有傳遞參數(shù)notify_url(服務(wù)器異步通知頁面路徑)或call_back_url(頁面跳轉(zhuǎn)同步通知頁面路徑)時(shí),商戶必須判斷商戶網(wǎng)站中是否已經(jīng)對(duì)該次的通知結(jié)果數(shù)據(jù)做過同樣處理。如果不判斷,存在潛在的風(fēng)險(xiǎn),商戶自行承擔(dān)因此而產(chǎn)生的所有損失。 
7 簽名機(jī)制 
7.1 生成待簽名的字符串 
7.1.1 需要參與簽名的參數(shù) 
在請(qǐng)求參數(shù)列表中,除去sign參數(shù)外,其他需要使用到的參數(shù)皆是要簽名的參數(shù)。
在授權(quán)接口html返回參數(shù)列表中:
正常返回的情況下,除去sign參數(shù)外,凡是返回回來的參數(shù)皆是要簽名的參數(shù);
發(fā)生錯(cuò)誤的情況下,不需要簽名。 
在交易接口通知返回參數(shù)列表中,除去sign參數(shù)外,凡是通知返回回來的參數(shù)皆是要簽名的參數(shù)。 
7.1.2 生成待簽名字符串 
對(duì)于如下的參數(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", 
}; 
對(duì)數(shù)組里的每一個(gè)值從a到z的順序排序,若遇到相同首字母,則看第二個(gè)字母,以此類推。 
排序完成之后,再把所有數(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ù)驗(yàn)簽不要排序,只需要按照支付寶返回的參數(shù)順序,組裝字符串,然后驗(yàn)簽,如支付寶異步通知POST方式返回的參數(shù)順序如下:service=alipay.wap.trade.create.direct&v=1.0&sec_id=0001&notify_data=<notify>…</notify> 
沒有值的參數(shù)無需傳遞,也無需包含到待簽名數(shù)據(jù)中; 
簽名時(shí)將字符轉(zhuǎn)化成字節(jié)流時(shí)指定的字符集與_input_charset保持一致; 
如果傳遞了_input_charset參數(shù),這個(gè)參數(shù)也應(yīng)該包含在待簽名數(shù)據(jù)中;
根據(jù)HTTP協(xié)議要求,傳遞參數(shù)的值中如果存在特殊字符(如:&、@等),那么該值需要做URL Encoding,這樣請(qǐng)求接收方才能接收到正確的參數(shù)值。這種情況下,待簽名數(shù)據(jù)應(yīng)該是原始值而不是encoding之后的值。例如:調(diào)用某接口需要對(duì)請(qǐng)求參數(shù)email進(jìn)行數(shù)字簽名,那么待簽名數(shù)據(jù)應(yīng)該是[email protected],而不是email=test%40msn.com。 
7.2 簽名 
7.2.1 MD5簽名 
在MD5簽名時(shí),需要私鑰參與簽名。MD5的私鑰是以英文字母和數(shù)字組成的32位字符串。商戶可登錄到商戶服務(wù)中心(https://b.alipay.com),安裝數(shù)字證書,在“技術(shù)服務(wù)”欄目中點(diǎn)擊“交易安全校驗(yàn)碼”,即可查看。 
請(qǐng)求時(shí)簽名 
當(dāng)拿到請(qǐng)求時(shí)的待簽名字符串后,需要把私鑰直接拼接到待簽名字符串后面,形成新的字符串,利用MD5的簽名函數(shù)對(duì)這個(gè)新的字符串進(jìn)行簽名運(yùn)算,從而得到32位簽名結(jié)果字符串(該字符串賦值于參數(shù)sign)。 
通知返回時(shí)驗(yàn)證簽名 
當(dāng)獲得到通知返回時(shí)的待簽名字符串后,同理,需要把私鑰直接拼接到待簽名字符串后面,形成新的字符串,利用MD5的簽名函數(shù)對(duì)這個(gè)新的字符串進(jìn)行簽名運(yùn)算,從而得到32位簽名結(jié)果字符串。此時(shí)這個(gè)新的字符串需要與支付寶通知返回參數(shù)中的參數(shù)sign的值進(jìn)行驗(yàn)證是否相等,來判斷簽名是否驗(yàn)證通過。
7.2.2 DSA、RSA簽名 
在DSA或RSA的簽名時(shí),需要私鑰和公鑰一起參與簽名。私鑰與公鑰皆是客戶通過OPENSSL來生成得出的�?蛻舭焉沙龅墓與支付寶技術(shù)人員配置好的支付寶公鑰做交換。因此,在簽名時(shí),客戶要用到的是客戶的私鑰及支付寶的公鑰。 
請(qǐng)求時(shí)簽名 
當(dāng)拿到請(qǐng)求時(shí)的待簽名字符串后,把待簽名字符串與客戶的私鑰一同放入DSA或RSA的簽名函數(shù)中進(jìn)行簽名運(yùn)算,從而得到簽名結(jié)果字符串。 
解密
當(dāng)獲得到通知返回時(shí)的原始數(shù)據(jù)后,首先要對(duì)加密的參數(shù)做解密。 
在授權(quán)接口中,要解密的返回參數(shù)是“res_data”。 
在交易接口中,要解密的返回參數(shù)是“notify_data”。 
即把res_data或notify_data、商戶私鑰一同放入RSA的解密函數(shù)中進(jìn)行解密運(yùn)算,從而得到解密結(jié)果字符串。 
通知返回時(shí)驗(yàn)證簽名 
當(dāng)獲得到通知返回時(shí)的待簽名字符串后,把待簽名字符串、支付寶提供的公鑰、支付寶通知返回參數(shù)中的參數(shù)sign的值三者一同放入DSA或RSA的簽名函數(shù)中進(jìn)行非對(duì)稱的簽名運(yùn)算,來判斷簽名是否驗(yàn)證通過。 
8 建議與意見 
如果您在閱讀技術(shù)文檔時(shí)有任何建議和意見,請(qǐng)點(diǎn)擊下面的鏈接跟帖回復(fù),我們將根據(jù)您的反饋完善文檔內(nèi)容。 
http://club.alipay.com/read.php?tid=8684674&fid=703
 
9 附錄
9.1 手機(jī)網(wǎng)頁即時(shí)到賬業(yè)務(wù)錯(cuò)誤碼 
表9-1 手機(jī)網(wǎng)頁即時(shí)到賬業(yè)務(wù)錯(cuò)誤碼
錯(cuò)誤代碼(code)  錯(cuò)誤原因(msg) 錯(cuò)誤詳細(xì)描述(detail) 含義 
0000  system exception  系統(tǒng)異常  系統(tǒng)異常 
0001  common params illegal  通用參數(shù)中少了如service、partner等必填參數(shù)  缺少必要的參數(shù),請(qǐng)檢查非空參數(shù)是否已傳遞 
0002  sign illegal  簽名不正確  簽名錯(cuò)誤,請(qǐng)檢查簽名的參數(shù)是否符合支付寶簽名規(guī)范 
0003  service not exist  不存在對(duì)應(yīng)的service  服務(wù)接口錯(cuò)誤,請(qǐng)檢查service是否傳遞正確 
0004  req_data illegal  req_data沒有按照<req>…<req>格式要求填寫  req_data格式不正確 
0005  partner illegal  合作伙伴沒有開通接口訪問權(quán)限  商戶未開通接口權(quán)限或合同已過期 
0006  sec_id not exist  不存在對(duì)應(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  賣家賬號(hào)不匹配  商戶不在受限列表中 
 
9.2 交易狀態(tài) 
表9-2 交易狀態(tài)
枚舉名稱  枚舉說明 
WAIT_BUYER_PAY  交易創(chuàng)建,等待買家付款。 
TRADE_CLOSED  在指定時(shí)間段內(nèi)未支付時(shí)關(guān)閉的交易; 
在交易完成全額退款成功時(shí)關(guān)閉的交易。
TRADE_SUCCESS  交易成功,且可對(duì)該交易做操作,如:多級(jí)分潤、退款等。
TRADE_PENDING  等待賣家收款(買家付款后,如果賣家賬號(hào)被凍結(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è)等近萬用戶的認(rèn)可。
  • “貴司提交的稿件專業(yè)詞匯用詞準(zhǔn)確,語言表達(dá)流暢,排版規(guī)范, 且服務(wù)態(tài)度好。在貴司的幫助下,我司的編制周期得以縮短,稿件語言的表達(dá)質(zhì)量得到很大提升”

    華東建筑設(shè)計(jì)研究總院

  • “我單位是一家總部位于丹麥的高科技企業(yè),和世聯(lián)翻譯第一次接觸,心中仍有著一定的猶豫,貴司專業(yè)的譯員與高水準(zhǔn)的服務(wù),得到了國外合作伙伴的認(rèn)可!”

    世萬保制動(dòng)器(上海)有限公司

  • “我公司是一家荷蘭駐華分公司,主要致力于行為學(xué)研究軟件、儀器和集成系統(tǒng)的開發(fā)和銷售工作,所需翻譯的英文說明書專業(yè)性強(qiáng),翻譯難度較大,貴司總能提供優(yōu)質(zhì)的服務(wù)�!�

    諾達(dá)思(北京)信息技術(shù)有限責(zé)任公司

  • “為我司在東南亞地區(qū)的業(yè)務(wù)開拓提供小語種翻譯服務(wù)中,翻譯稿件格式美觀整潔,能最大程度的還原原文的樣式,同時(shí)翻譯質(zhì)量和速度也得到我司的肯定和好評(píng)!”

    上海大眾

  • “在此之前,我們公司和其他翻譯公司有過合作,但是翻譯質(zhì)量實(shí)在不敢恭維,所以當(dāng)我認(rèn)識(shí)劉穎潔以后,對(duì)她的專業(yè)性和貴公司翻譯的質(zhì)量非常滿意,隨即簽署了長期合作合同�!�

    銀泰資源股份有限公司

  • “我行自2017年與世聯(lián)翻譯合作,合作過程中十分愉快。特別感謝Jasmine Liu, 態(tài)度熱情親切,有耐心,對(duì)我行提出的要求落實(shí)到位,體現(xiàn)了非常高的專業(yè)性�!�

    南洋商業(yè)銀行

  • “與我公司對(duì)接的世聯(lián)翻譯客服經(jīng)理,可以及時(shí)對(duì)我們的要求進(jìn)行反饋,也會(huì)盡量滿足我們臨時(shí)緊急的文件翻譯要求。熱情周到的服務(wù)給我們留下深刻印象!”

    黑龍江飛鶴乳業(yè)有限公司

  • “翻譯金融行業(yè)文件各式各樣版式復(fù)雜,試譯多家翻譯公司,后經(jīng)過比價(jià)、比服務(wù)、比質(zhì)量等流程下來,最終敲定了世聯(lián)翻譯。非常感謝你們提供的優(yōu)質(zhì)服務(wù)�!�

    國金證券股份有限公司

  • “我司所需翻譯的資料專業(yè)性強(qiáng),涉及面廣,翻譯難度大,貴司總能提供優(yōu)質(zhì)的服務(wù)。在一次業(yè)主單位對(duì)完工資料質(zhì)量的抽查中,我司因?yàn)槎砦姆g質(zhì)量過關(guān)而受到了好評(píng)�!�

    中辰匯通科技有限責(zé)任公司

  • “我司在2014年與貴公司建立合作關(guān)系,貴公司的翻譯服務(wù)質(zhì)量高、速度快、態(tài)度好,贏得了我司各部門的一致好評(píng)。貴司經(jīng)理工作認(rèn)真踏實(shí),特此致以誠摯的感謝!”

    新華聯(lián)國際置地(馬來西亞)有限公司

  • “我們需要的翻譯人員,不論是筆譯還是口譯,都需要具有很強(qiáng)的專業(yè)性,貴公司的德文翻譯稿件和現(xiàn)場(chǎng)的同聲傳譯都得到了我公司和合作伙伴的充分肯定。”

    西馬遠(yuǎn)東醫(yī)療投資管理有限公司

  • “在這5年中,世聯(lián)翻譯公司人員對(duì)工作的認(rèn)真、負(fù)責(zé)、熱情、周到深深的打動(dòng)了我。不僅譯件質(zhì)量好,交稿時(shí)間及時(shí),還能在我司資金周轉(zhuǎn)緊張時(shí)給予體諒�!�

    華潤萬東醫(yī)療裝備股份有限公司

  • “我公司與世聯(lián)翻譯一直保持著長期合作關(guān)系,這家公司報(bào)價(jià)合理,質(zhì)量可靠,效率又高。他們翻譯的譯文發(fā)到國外公司,對(duì)方也很認(rèn)可�!�

    北京世博達(dá)科技發(fā)展有限公司

  • “貴公司翻譯的譯文質(zhì)量很高,語言表達(dá)流暢、排版格式規(guī)范、專業(yè)術(shù)語翻譯到位、翻譯的速度非�?�、后期服務(wù)熱情。我司翻譯了大量的專業(yè)文件,經(jīng)過長久合作,名副其實(shí),值得信賴。”

    北京塞特雷特科技有限公司

  • “針對(duì)我們農(nóng)業(yè)科研論文寫作要求,盡量尋找專業(yè)對(duì)口的專家為我提供翻譯服務(wù),最后又按照學(xué)術(shù)期刊的要求,提供潤色原稿和相關(guān)的證明文件。非常感謝世聯(lián)翻譯公司!”

    中國農(nóng)科院

  • “世聯(lián)的客服經(jīng)理態(tài)度熱情親切,對(duì)我們提出的要求都落實(shí)到位,回答我們的問題也非常有耐心。譯員十分專業(yè),工作盡職盡責(zé),獲得與其共事的公司總部同事們的一致高度認(rèn)可�!�

    格萊姆公司

  • “我公司與馬來西亞政府有相關(guān)業(yè)務(wù)往來,急需翻譯項(xiàng)目報(bào)備材料。在經(jīng)過對(duì)各個(gè)翻譯公司的服務(wù)水平和質(zhì)量的權(quán)衡下,我們選擇了世聯(lián)翻譯公司。翻譯很成功,公司領(lǐng)導(dǎo)非常滿意�!�

    北京韜盛科技發(fā)展有限公司

  • “客服經(jīng)理能一貫熱情負(fù)責(zé)的完成每一次翻譯工作的組織及溝通。為客戶與譯員之間搭起順暢的溝通橋梁。能協(xié)助我方建立專業(yè)詞庫,并向譯員準(zhǔn)確傳達(dá)落實(shí),準(zhǔn)確及高效的完成統(tǒng)一風(fēng)格�!�

    HEURTEY PETROCHEM法國赫銻石化

  • “貴公司與我社對(duì)翻譯項(xiàng)目進(jìn)行了幾次詳細(xì)的會(huì)談,期間公司負(fù)責(zé)人和廖小姐還親自來我社拜訪,對(duì)待工作熱情,專業(yè)度高,我們雙方達(dá)成了很好的共識(shí)。對(duì)貴公司的服務(wù)給予好評(píng)!”

    東華大學(xué)出版社

  • “非常感謝世聯(lián)翻譯!我們對(duì)此次緬甸語訪談翻譯項(xiàng)目非常滿意,世聯(lián)在充分了解我司項(xiàng)目的翻譯意圖情況下,即高效又保質(zhì)地完成了譯文。”

    上海奧美廣告有限公司

  • “在合作過程中,世聯(lián)翻譯保質(zhì)、保量、及時(shí)的完成我們交給的翻譯工作�?蛻艚�(jīng)理工作積極,服務(wù)熱情、周到,能全面的了解客戶的需求,在此表示特別的感謝�!�

    北京中唐電工程咨詢有限公司

  • “我們通過圖書翻譯項(xiàng)目與你們相識(shí)乃至建立友誼,你們報(bào)價(jià)合理、服務(wù)細(xì)致、翻譯質(zhì)量可靠。請(qǐng)?jiān)试S我們借此機(jī)會(huì)向你們表示衷心的感謝!”

    山東教育出版社

  • “很滿意世聯(lián)的翻譯質(zhì)量,交稿準(zhǔn)時(shí),中英互譯都比較好,措辭和句式結(jié)構(gòu)都比較地道,譯文忠實(shí)于原文。TNC是一家國際環(huán)保組織,發(fā)給我們美國總部的同事后,他們反應(yīng)也不錯(cuò)�!�

    TNC大自然保護(hù)協(xié)會(huì)

  • “原英國首相布萊爾來訪,需要非常專業(yè)的同聲傳譯服務(wù),因是第一次接觸,心中仍有著一定的猶豫,但是貴司專業(yè)的譯員與高水準(zhǔn)的服務(wù),給我們留下了非常深刻的印象�!�

    北京師范大學(xué)壹基金公益研究院

  • “在與世聯(lián)翻譯合作期間,世聯(lián)秉承著“上善若水、厚德載物”的文化理念,以上乘的品質(zhì)和質(zhì)量,信守對(duì)客戶的承諾,出色地完成了我公司交予的翻譯工作�!�

    國科創(chuàng)新(北京)信息咨詢中心

  • “由于項(xiàng)目要求時(shí)間相當(dāng)緊湊,所以世聯(lián)在保證質(zhì)量的前提下,盡力按照時(shí)間完成任務(wù)。使我們?cè)谑啦⿻?huì)俄羅斯館日活動(dòng)中準(zhǔn)備充足,并受到一致好評(píng)�!�

    北京華國之窗咨詢有限公司

  • “貴公司針對(duì)客戶需要,挑選優(yōu)秀的譯員承接項(xiàng)目,翻譯過程客戶隨時(shí)查看中途稿,并且與客戶溝通術(shù)語方面的知識(shí),能夠更準(zhǔn)確的了解到客戶的需求,確保稿件高質(zhì)量�!�

    日工建機(jī)(北京)國際進(jìn)出口有限公司