更新日期:2023年 11月 17日QuickSDK Server Connect Document
<h3 style="margin-left:24px;line-height:3em;">
<strong><span style="font-size:19px;font-family:';">1.<span style="font:9px ';"> </span></span></strong><strong><span style="font-size:19px;font-family:';">API :Verifying userinfo </span></strong>
</h3>
<h4 style="margin-left:33px;line-height:3em;">
<strong><span style="font-family:';">1.1<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:';">Instruction</span></strong>
</h4>
<p style="margin-left:52px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">The API is started from game sever to SDK sever</span>
</p>
<p style="margin-left:52px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">The main function of this API is that the game sever verifies the users' information for SDK server via token.</span>
</p>
<p style="margin-left:52px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">SDK client will inform Game client about token values /Game client will get the token value through SDK client</span>
</p>
<p style="margin-left:52px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">Succeed to return 1</span>
</p>
<p style="margin-left:52px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:"color:#E53333;">The UID is exclusive for the same market, or may repetitive for the others/different markets, that's why Game sever must combine market ID with market UID to comfirm the identity of game character</span>
</p>
<p style="margin-left:33px;text-indent:0px;line-height:3em;">
<span style="font-family:';"> </span>
</p>
<h4 style="margin-left:33px;line-height:3em;">
<strong><span style="font-family:';">1.2<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:';">API Address</span></strong>
</h4>
<p style="margin-left:24px;text-indent:0px;line-height:3em;">
<span style="font-family:'color:black;">ADD:http://checkuser.quickapi.net/v2/checkUserInfo</span>
</p>
<p style="margin-left:33px;text-indent:0px;line-height:3em;">
<strong><span style="font-family:';"> </span></strong>
</p>
<h4 style="margin-left:33px;line-height:3em;">
<strong><span style="font-family:';">1.3<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:';">Request method</span></strong>
</h4>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:'color:black;">GET/POST</span>
</p>
<p style="line-height:3em;">
<strong><span style="font-family:';"> </span></strong>
</p>
<h4 style="margin-left:33px;line-height:3em;">
<strong><span style="font-family:';">1.4<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:';">Parameter list</span></strong>
</h4>
<p style="text-indent:28px;">
<span style="font-family:"color:black;background-color:white;text-indent:28px;">
<table style="width:100%;" cellpadding="2" cellspacing="0" border="1" bordercolor="#000000">
<tbody>
<tr>
<td style="width:12%;">
Parameter Name<br />
</td>
<td style="width:10%;">
<span style="white-space:normal;text-indent:28px;">Importance</span><br />
</td>
<td style="width:10%;">
<span style="white-space:normal;color:#323232;font-family:微软雅黑, "background-color:#FFFFFF;text-indent:28px;">Data Type</span><br />
</td>
<td>
Explanation<br />
</td>
</tr>
<tr>
<td>
token<br />
</td>
<td>
Always<br />
</td>
<td>
string<br />
</td>
<td>
Game client can get token value from SDK client, and the token value can be transferred to Game sever without decoding. The length of this token value is less , or equal, than 512, we suggest developers to reserve enough space for that.<br />
</td>
</tr>
<tr>
<td>
uid<br />
</td>
<td>
Always<br />
</td>
<td>
string<br />
</td>
<td>
You can obtain the original UID of market from client API without any additional operations.
</td>
</tr>
<tr>
<td>
product_code<br />
</td>
<td>
Optional<br />
</td>
<td>
String<br />
</td>
<td>
You can get this product code value by viewing game information from the Quick background<br />
</td>
</tr>
<tr>
<td>
channel_code<br />
</td>
<td>
Optional<br />
</td>
<td>
String<span style="white-space:pre;"> </span> <br />
</td>
<td>
Passing in this value will verify whether the uid and token match the channel_ code is consistent. If there is an account transfer between player channels during the game operation process, it should be ensured that this value is correct (this interface is the channel type interface in the client document)<br />
</td>
</tr>
</tbody>
</table>
<br />
<br />
</span>
</p>
<p style="text-indent:28px;">
<span style="font-family:"color:black;background-color:white;text-indent:28px;"><br />
</span>
</p>
<p style="text-indent:28px;">
<span style="font-family:"color:black;background-color:white;text-indent:28px;">NOTE : There is only one UID for the same market, and developers can obtain the original UID from QuickSDK API .</span><span style="font-family:"color:black;background-color:white;text-indent:28px;">It may exists the same UID for different markets (i.g: UID '1' may be the user of Baidu &UC for the same time)</span>
</p>
<p>
<span style="font-family:"color:black;background-color:white;text-indent:28px;">That's why we need to combine market ID with market UID to confirm the only identity of Game user.</span>
</p>
<p>
<span style="font-family:"color:black;"> i.g: market ID@market UID, market ID|market UID, market ID_ market UID etc.)</span>
</p>
<p style="line-height:3em;">
<strong><span style="font-family:';"> </span></strong>
</p>
<h4 style="margin-left:33px;line-height:3em;">
<strong><span style="font-family:';">1.5<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">Return result</span></strong>
</h4>
<p style="margin-left:24px;text-indent:0px;line-height:3em;">
<span style="font-family:'color:black;">Returning result is plain string</span>
</p>
<p style="margin-left:24px;text-indent:0px;line-height:3em;">
<span style="font-family:'color:black;">i.g:1 </span>
</p>
<p style="margin-left:24px;text-indent:0px;line-height:3em;">
<span style="font-family:'color:black;">Beside 1,all other value represent failure/There's no other value can represent </span><span style="font-family:'color:#0D0D0D;">successed except 1. It represents failure except string 1. Only plain string 1 </span><span style="font-family:'color:#0D0D0D;"> represent success.</span>
</p>
<p style="line-height:3em;">
<strong><span style="font-family:';"> </span></strong>
</p>
<h4 style="margin-left:33px;line-height:3em;">
<strong><span style="font-family:';">1.6<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">Required example</span></strong>
</h4>
<p style="margin-left:24px;line-height:3em;">
<span style="font-family:'color:black;">http://checkuser.quickapi.net/v2/checkUserInfo?token?token=@178@83@173@158@157@88@108@86@118@98@117@107@105@106@108@99@104@120@108@103@112@123@125@106@96@101@104@110@104@115@105@101@169@187@175@156@163@183@152@164@101@155@134@217@160@158@157@87@115@103@102@105@101@99@105@99@99@110@105@92@85@154@157@152@165@163@158@163@121@151@90@112@90@100@102@87@157@151@219@196@217@215@134@165@121@163@225&uid=D2A864635A709FD302080B508FF98D49&product_code=64345624204336603757759703868145</span>
</p>
<p style="line-height:3em;">
<span style="font-family:';"> </span>
</p>
<h3 style="margin-left:24px;line-height:3em;">
<strong><span style="font-size:19px;font-family:';">2.<span style="font:9px ';"> </span></span></strong><strong><span style="font-size:19px;font-family:';">API:Recharge synchronization</span></strong>
</h3>
<p style="line-height:3em;">
<span style="font-weight:bold;font-family:""> </span> <span style="color:#E53333;">Payment decryption process: (CallbackKey is used to decode the ciphertext of the notification; Md5Key is used to verify the signature)</span>
</p>
<p style="line-height:3em;">
<span style="color:#E53333;">The final amount of items distributed in the game should be based on the amount</span><br />
1. Received callback parameters (nt_data, sign, md5Sign)<br />
2. Calculate md5 (nt_data+sign+md5key) to obtain the signature (md5key obtained in the quick background), which is consistent with the received md5Sign, and the signature passes<br />
3. Use callbackkey to decrypt nt_ Data
</p>
<p style="line-height:3em;">
4. After successful decryption, the game distributes items according to the amount in the notification XML<br />
Calculate signature as nt_data is concatenated with the value of sign, and then concatenated with md5key to calculate md5. The calculated result is compared with md5Sign in POST
</p>
<h4 style="margin-left:28px;line-height:3em;">
<strong><span style="font-family:'color:black;">2.1<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">Instruction</span></strong>
</h4>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">Developers need to fill their goods url in QuickSDK background->parameter configuration->synchronizing address.</span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">QuickSDK need to send back the postback parameter in xml type via http post.</span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">Developers reading and analyzing QuickSDK POST data , then writing/coding in their game systems/own database.</span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">All parameter values need to be encrypted or decoded in algorithm of Chapter 3.</span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">Synchronous notification will inform developers about the recharge source/which market of this recharge come from(i.g 360Game center, 91 game).</span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">While the recharge order is synchronously completed, Developers need to double check the order in case reprocessing. And send <span style="color:#E53333;"><strong>SUCCESS</strong></span> to QuickSDK once it succeed.(Only these 7 pure strings can be returned without any other characters)</span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:'color:black;"><span style="white-space:normal;font-family:Wingdings;">l</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:9px;line-height:normal;font-family:"white-space:normal;"> </span>The response speed of the distribution tool interface should be within 5 seconds. The slower the response of the distribution interface, the lower the frequency of QuickSDK sending notifications to this interface<br />
</span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:"color:#E53333;">Note: During the parent package payment process, the "Payment Success" and "Payment Failure" options that pop up after the client clicks are only used to send client notifications. The server sends notifications based on whether to use the test account created here and whether the account balance is sufficient.</span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:'color:black;"><br />
</span>
</p>
<h4 style="margin-left:28px;line-height:3em;">
<strong><span style="font-family:'color:black;">2.2<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">Request parameter</span></strong>
</h4>
<p style="line-height:3em;">
<span style="font-family:'color:black;">QuickSDK sever will send these parameters to developers in 'http post':</span>
</p>
<p style="line-height:3em;">
<span style="font-family:'color:black;">
<table style="width:100%;" cellpadding="2" cellspacing="0" border="1" bordercolor="#000000">
<tbody>
<tr>
<td style="width:12%;">
<span style="white-space:normal;font-family:"color:white;background-color:#4F81BD;">Parameter Name</span><br />
</td>
<td>
<span style="white-space:normal;font-family:"color:white;background-color:#4F81BD;">Data Type</span><br />
</td>
<td>
<span style="white-space:normal;font-family:"color:white;background-color:#4F81BD;">Instruction</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-family:"color:#555555;">nt_data</span><br />
</td>
<td>
<span style="white-space:normal;color:#323232;font-family:微软雅黑, "font-size:14px;background-color:#FFFFFF;">string</span><br />
</td>
<td>
The notification data is decoded into XML format, as detailed in 2.1.1<br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-family:"color:#555555;">sign</span><br />
</td>
<td>
<span style="white-space:normal;color:#323232;font-family:微软雅黑, "font-size:14px;background-color:#FFFFFF;">string</span><br />
</td>
<td>
signature string, please refer to Chapter 3 for details<br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-family:"color:#555555;">md5Sign</span><br />
</td>
<td>
<span style="white-space:normal;color:#323232;font-family:微软雅黑, "font-size:14px;background-color:#FFFFFF;">string</span><br />
</td>
<td>
The calculation method is MD5 (nt_data+sign+md5key), and the three values can be directly concatenated<br />
</td>
</tr>
</tbody>
</table>
<br />
</span>
</p>
<p>
<span style="font-family:"color:black;">Parameters will be transferred by decoding method which is mentioned in Chapter Developers can get the plain text XML in 2.1.1 by decoding these parameters.</span>
</p>
<h4 style="margin-left:28px;line-height:3em;">
<span style="font-family:'color:black;"></span><span style="font-family:Wingdings;color:black;"><span style="font:9px ';"> </span></span><span style="font-family:'color:black;"><br />
2.2.1 XML type of nt_data parameter</span>
</h4>
<p style="line-height:3em;">
<span style="font-family:'color:black;"></span>
</p>
<pre class="brush:java;toolbar:false"><?xml version="1.0" encoding="UTF-8"?>
<quicksdk_message>
<message>
<is_test></is_test>
<channel></channel>
<channel_uid></channel_uid>
<game_order></game_order>
<order_no></order_no>
<pay_time></pay_time>
<amount></amount>
<status></status>
<extras_params></extras_params>
</message>
</quicksdk_message></pre>
<p style="line-height:3em;">
<span style="font-family:'color:black;"></span>
</p>
<p style="line-height:3em;">
<span style="font-family:'color:black;"> </span>
</p>
<h4 style="line-height:3em;">
<span style="font-family:"color:black;">2.2.2 XML filed instruction </span>
</h4>
<p>
<span style="font-size:small;"><br />
<table style="width:100%;" cellpadding="2" cellspacing="0" border="1" bordercolor="#000000" align="left">
<tbody>
<tr>
<td style="width:13%;">
Parameter Name<br />
</td>
<td style="width:8%;">
Data Type<br />
</td>
<td style="width:12%;">
Importance Level<br />
</td>
<td>
<span style="white-space:normal;font-family:"color:white;background-color:#4F81BD;">Inst</span><span style="white-space:normal;font-family:"color:white;background-color:#4F81BD;">ruction</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-family:"color:#555555;">is</span><span style="white-space:normal;font-family:"color:#555555;">_test</span><br />
</td>
<td>
<span style="white-space:normal;font-family:"color:#555555;">stri</span><span style="white-space:normal;font-family:"color:#555555;">ng</span><br />
</td>
<td>
<span style="white-space:normal;font-family:"color:#555555;">Alwa</span><span style="white-space:normal;font-family:"color:#555555;">ys</span><br />
</td>
<td>
1 stands for test order, 0 stands for official order. Developers shall pay goods to consumers according to the result<br />
</td>
</tr>
<tr>
<td>
channel<br />
</td>
<td>
string<br />
</td>
<td>
Always<br />
</td>
<td>
Market ID NOTE: Developers could choose to test whether the payment notification data channel is different from the character's registered channel. If it is not the same channel, developers can refuse to pay the goods. Developers do this test depend on the specific situation<br />
</td>
</tr>
<tr>
<td>
channel_uid<br />
</td>
<td>
string<br />
</td>
<td>
Always<br />
</td>
<td>
<span style="white-space:normal;color:black;font-family:"background-color:#FFFFFF;">Market user identification, you can get this value from client GetUserId()</span><br />
</td>
</tr>
<tr>
<td>
game_order<br />
</td>
<td>
string<br />
</td>
<td>
Always<br />
</td>
<td>
Game clients call payment function in QuickSDK lib can set this params , and it will send to Game Server when this order has pay<br />
</td>
</tr>
<tr>
<td>
order_no<br />
</td>
<td>
string<br />
</td>
<td>
Always<br />
</td>
<td>
The exclusive/official order number of QuickSDK<br />
</td>
</tr>
<tr>
<td>
pay_time<br />
</td>
<td>
string<br />
</td>
<td>
<span style="white-space:normal;">Alwa</span><span style="white-space:normal;">ys</span><br />
</td>
<td>
Pay time 2015-01-01 23:00:00<br />
</td>
</tr>
<tr>
<td>
amount<br />
</td>
<td>
<span style="white-space:normal;">s</span><span style="white-space:normal;">tring</span><br />
</td>
<td>
<span style="white-space:normal;">Alwa</span><span style="white-space:normal;">ys</span><br />
</td>
<td>
The transaction amount, in yuan, should be based on the final amount of items distributed in the game<br />
</td>
</tr>
<tr>
<td>
status<br />
</td>
<td>
<span style="white-space:normal;">s</span><span style="white-space:normal;">tring</span><br />
</td>
<td>
<span style="white-space:normal;">Alwa</span><span style="white-space:normal;">ys</span><br />
</td>
<td>
Recharge status ,0 stands for success, 1 stands for fail.( It should return FAILED when it is 1)<br />
</td>
</tr>
<tr>
<td>
extras_params<br />
</td>
<td>
<span style="white-space:normal;">s</span><span style="white-space:normal;">tring</span><br />
</td>
<td>
<span style="white-space:normal;">Alwa</span><span style="white-space:normal;">ys</span><br />
</td>
<td>
If the game client orders with such extras_params , extras_params of this order function will return as it is; if not, the return is empty<br />
</td>
</tr>
</tbody>
</table>
</span>
</p>
<p style="line-height:3em;">
<strong><span style="font-size:19px;font-family:';"> </span></strong>
</p>
<h3 style="margin-left:24px;line-height:3em;">
<strong><span style="font-size:19px;font-family:';">3.<span style="font:9px ';"> </span></span></strong><strong><span style="font-size:19px;font-family:';">MD5 Sign(Synchronous API)</span></strong>
</h3>
<h4 style="margin-left:28px;line-height:3em;">
<strong><span style="font-family:'color:black;">3.1<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">Instruction</span></strong>
</h4>
<p style="margin-left:56px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">Filed :md5Sign</span><span style="font-family:'color:black;">。</span>
</p>
<p style="margin-left:56px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">Caculating the received original ciphertext</span>
</p>
<p style="margin-left:56px;text-indent:0px;line-height:3em;">
<span style="font-family:'color:black;"> </span>
</p>
<h4 style="margin-left:28px;line-height:3em;">
<strong><span style="font-family:'color:black;">3.2<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">Description</span></strong>
</h4>
<p style="margin-left:56px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">nt_data</span><span style="font-family:'color:black;">、sign、md5Sign will. be received by callback API.</span>
</p>
<p style="margin-left:56px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">Developers can obtain the current md5SignLocal via function: md5(nt_data+sign+md5key)</span>
</p>
<p style="margin-left:56px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">Developers can judge the result by testing the consistency of Local calculating md5SignLocal with received md5Sign.</span>
</p>
<p style="margin-left:56px;line-height:3em;">
<span style="font-family:Wingdings;color:black;">l<span style="font:9px ';"> </span></span><span style="font-family:'color:black;">md5Key can be assigned and obtained from QuickSDK.</span>
</p>
<p style="line-height:3em;">
<strong><span style="font-size:19px;font-family:';"> </span></strong>
</p>
<h3 style="margin-left:24px;line-height:3em;">
<strong><span style="font-size:19px;font-family:';">4.<span style="font:9px ';"> </span></span></strong><strong><span style="font-size:19px;font-family:';">API: encryption / decryption(synchronous API)</span></strong>
</h3>
<h4 style="margin-left:28px;line-height:3em;">
<strong><span style="font-family:';">4.1<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">Encryption</span></strong>
</h4>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:'color:black;">Cryptographic algorithm</span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:'color:black;">Details in Appendix 1 </span>
</p>
<p style="margin-left:28px;text-indent:0px;line-height:3em;">
<strong><span style="font-family:';"> </span></strong>
</p>
<h4 style="margin-left:28px;line-height:3em;">
<strong><span style="font-family:';">4.2<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">Decryption</span></strong>
</h4>
<p style="text-indent:28px;line-height:3em;">
<span style="font-family:'color:black;">Decipherment algorithm</span>
</p>
<p style="text-indent:28px;line-height:3em;">
<span style="font-family:'color:black;">Details in Appendix 1</span>
</p>
<p style="line-height:3em;">
<strong><span style="font-family:';"> </span></strong>
</p>
<h4 style="margin-left:28px;line-height:3em;">
<strong><span style="font-family:';">4.3<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">EXAMPLE</span></strong>
</h4>
<p style="line-height:3em;">
<span style="font-family:'color:black;">Assume that these are the callback parameters that developers have received from QuickSDK:</span>
</p>
<p style="line-height:3em;">
<span style="font-family:'color:black;">nt_data=@116@119@168@161@165@88@170@153@167@170@161@163@166@113@87@99@94@102@83@85@153@166@154@164@155@157@166@152@114@90@140@135@126@101@104@86@89@171@168@149@163@155@153@160@167@162@154@111@82@164@160@87@115@118@115@168@162@173@165@160@164@166@170@146@165@157@163@167@154@159@153@114@113@164@157@167@171@149@156@151@110@114@154@168@147@172@156@168@171@114@104@109@100@161@170@146@172@157@163@168@119@116@151@156@150@165@166@153@164@114@109@106@104@110@109@100@151@160@152@163@165@153@164@111@113@155@159@148@166@166@149@160@152@173@157@152@115@105@107@101@112@104@106@110@95@153@153@150@162@166@156@161@150@169@161@149@115@116@158@148@165@157@143@163@171@156@153@166@115@104@106@103@108@105@107@105@104@111@109@100@155@153@164@154@150@163@170@149@154@170@117@111@167@170@148@153@171@151@162@163@115@104@106@105@106@100@102@104@96@108@98@103@101@105@107@103@105@100@108@101@102@105@109@107@108@107@99@112@104@167@166@152@154@169@151@162@167@114@113@162@145@175@144@169@157@165@156@115@105@100@105@103@98@104@109@96@105@106@80@101@106@114@104@102@111@105@104@112@103@164@150@171@143@170@154@162@153@118@115@150@164@163@173@159@169@118@104@97@104@104@108@99@154@165@163@169@163@171@118@112@171@168@150@166@165@169@111@101@112@103@170@169@152@168@173@164@115@116@156@171@172@170@145@167@152@168@149@166@150@164@171@114@179@101@178@145@171@104@174@113@99@157@175@169@169@149@171@144@165@153@169@148@165@171@110@112@104@165@153@167@168@152@159@153@118@112@100@165@155@175@158@164@163@166@170@148@164@153@171@164@150@159@156@113&sign=@106@154@147@150@154@155@153@150@151@157@106@103@153@101@110@107@150@104@103@150@104@155@152@154@109@109@158@101@109@111@156@99&md5Sign=c644c134144555807c228bd439f8264d</span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:'color:black;">a)<span style="font:9px ';"> </span></span><span style="font-family:';">Game sever should test the validity of signature right after receiving these 3 datas:</span>
</p>
<p style="margin-left:28px;text-indent:0px;line-height:3em;">
<span style="font-family:';">Computing md5(nt_data+sign+md5key) to get c644c134144555807c228bd439f8264d,</span><span style="font-family:"">if the result is same as the received md5Sign, the signature is successful.</span>
</p>
<p style="margin-left:28px;text-indent:0px;line-height:3em;">
<span style="font-family:'color:black;"> </span><span style="font-family:"color:black;">b)<span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:9px;line-height:normal;font-family:""> </span></span><span style="font-family:"color:black;">According to the method of Appendix 1, you can get the xml by decoding nt_data</span>
</p>
<p style="line-height:3em;">
<span style="font-family:'color:black;"> </span>
</p>
<p style="line-height:3em;">
<span style="font-family:'color:black;"></span>
</p>
<pre class="brush:java;toolbar:false"><?xml version="1.0" encoding="UTF-8" standalone="no"?>
<quicksdk_message>
<message>
<is_test>0</is_test>
<channel>8888</channel>
<channel_uid>231845</channel_uid>
<game_order>123456789</game_order>
<order_no>12520160612114220441168433</order_no>
<pay_time>2016-06-12 11:42:20</pay_time>
<amount>1.00</amount>
<status>0</status>
<extras_params>{1}_{2}</extras_params>
</message>
</quicksdk_message></pre>
<p style="line-height:3em;">
<span style="font-family:'color:black;"></span>
</p>
<p style="margin-left:28px;line-height:3em;">
<span style="font-family:'color:black;"><span style="color:#E53333;">c)</span><span style="font:9px "color:#E53333;"> </span></span><span style="font-family:"color:#E53333;">Developers will pay the payable goods according to the accurate amount as XML notified, if decryption is successful.</span>
</p>
<p style="line-height:3em;">
<span style="font-family:'color:black;"> </span>
</p>
<p style="line-height:3em;">
<strong><span style="font-family:';"> </span></strong>
</p>
<h3 style="margin-left:24px;line-height:3em;">
<strong><span style="font-size:19px;font-family:';">5.<span style="font:9px ';"> </span></span></strong><strong><span style="font-size:19px;font-family:';">Send notification again</span></strong>
</h3>
<p style="text-indent:24px;line-height:3em;">
<span style="font-size:16px;font-family:'color:black;">For some unexpected/unpredicted reasons/situations, QuickSDK sever will not be able to receive SUCCESS . QuickSDK sever will send notification again. And it/QuickSDK sever will persistently sending a new notification to Game sever in certain time</span>
</p>
<p style="text-indent:24px;line-height:3em;">
<span style="font-size:16px;font-family:'color:black;">There will be an Error to remind that the order is failed(return value is not SUCCESS):SignError</span><span style="font-size:16px;font-family:'color:black;">、AmountError</span>
</p>
<p style="text-indent:24px;line-height:3em;">
<span style="font-size:16px;font-family:'color:black;">It should be noted that when a game accumulates a large number of errors and returns, the system will reduce the frequency of replenishment for this game, and game developers need to develop and distribute prop interfaces correctly.<br />
</span>
</p>
<p style="line-height:3em;">
<strong><span style="font-size:19px;font-family:';"> </span></strong>
</p>
<h3 style="margin-left:24px;line-height:3em;">
<strong><span style="font-size:19px;font-family:';">6.<span style="font:9px ';"> </span></span></strong><strong><span style="font-size:19px;font-family:';">Appendix 1</span></strong>
</h3>
<h4 style="margin-left:24px;line-height:3em;">
<strong><span style="font-family:'color:black;">a)<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">Pseudo-code Encryption algorithm</span></strong><strong><span style="font-family:'color:black;">:</span></strong>
</h4>
<p style="line-height:3em;">
<span style="font-family:'color:black;"></span>
</p>
<pre class="brush:java;toolbar:false">public static String encode(String src,String key) {
try {
byte[] data = src.getBytes(charset);
byte[] keys = key.getBytes();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < data.length; i++) {
int n = (0xff & data[i]) + (0xff & keys[i % keys.length]);
sb.append("@" + n);
}
return sb.toString();
}catch (UnsupportedEncodingException e){
e.printStackTrace();
}
return src;
}</pre>
<p style="line-height:3em;">
<span style="font-family:'color:black;"></span>
</p>
<h4 style="margin-left:24px;line-height:3em;">
<strong><span style="font-family:'color:black;">b)<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">Pseudo-code Decryption algorithm</span></strong><strong><span style="font-family:'color:black;">:</span></strong>
</h4>
<p style="line-height:3em;">
<span style="font-family:'color:black;"></span>
</p>
<pre class="brush:java;toolbar:false">public static String decode(String src,String key) {
if(src == null || src.length() == 0){
return src;
}
Matcher m = pattern.matcher(src);
List list = new ArrayList();
while (m.find()) {
try {
String group = m.group();
list.add(Integer.valueOf(group));
} catch (Exception e) {
e.printStackTrace();
return src;
}
}
if (list.size() > 0) {
try {
byte[] data = new byte[list.size()];
byte[] keys = key.getBytes();
for (int i = 0; i < data.length; i++) {
data[i] = (byte) (list.get(i) - (0xff & keys[i % keys.length]));
}
return new String(data, charset);
} catch (UnsupportedEncodingException e){
e.printStackTrace();
}
return src;
} else {
return src;
}
}</pre>
<p style="line-height:3em;">
<span style="font-family:'color:black;"></span>
</p>
<p style="line-height:3em;">
<strong><span style="font-family:'color:black;"> </span></strong>
</p>
<h4 style="margin-left:24px;line-height:3em;">
<strong><span style="font-family:'color:black;">c)<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">KEY</span></strong>
</h4>
<p style="line-height:3em;">
<span style="font-family:'color:black;">The key for encryption or decryption is the callbackkey which was agreed by QuickSDK sever and Game sever ,at beginning. This value can obtain by QuickSDK console,( log in www.quicksdk.com) </span><span style="font-family:'color:black;">→choose(the correct product) →click (parameter configuration)</span>
</p>
<p style="line-height:3em;">
<strong><span style="font-family:'color:black;"> </span></strong>
</p>
<h4 style="margin-left:24px;line-height:3em;">
<strong><span style="font-family:'color:black;">d)<span style="font:9px ';"> </span></span></strong><strong><span style="font-family:'color:black;">How to download</span></strong>
</h4>
<p style="line-height:3em;">
<span style="font-family:'color:#0D0D0D;">You can get the </span><span style="font-family:'color:#0D0D0D;background:#FCFCFE;"> </span><span style="font-family:'color:#0D0D0D;background:#FCFCFE;">QuickSDK server access document </span><span style="font-family:'color:#0D0D0D;"> </span><span style="font-family:'color:#0D0D0D;background:#FCFCFE;">on the website's download center/ QuickSDK server access document is available on the website's download center, including </span><span style="font-family:'color:#0D0D0D;">C#</span><span style="font-family:'color:#0D0D0D;">、C++、Java、PHP</span>
</p>
<p style="line-height:3em;">
<strong><span style="font-size:19px;font-family:';"> </span></strong>
</p>
<p style="line-height:3em;">
<strong><span style="font-size:19px;font-family:';"> </span></strong>
</p>
<p>
<br />
</p>