hch
6 天以前 e8d63e91d80cc59d7947ad026149c2b752ce9364
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.secondworld.sdk.command;
 
 
import android.widget.Toast;
 
import com.secondworld.sdk.GameAppProxy;
import com.secondworld.sdk.QuickSdkMgr;
import com.secondworld.sdk.utils.CodeU2A;
import com.smwl.smsdk.bean.PayInfo;
import org.json.JSONObject;
import java.net.URLEncoder;
 
public class CmdPlatformPay implements ICommand {
    @Override
    public int getCode() {
        return CodeU2A.PlatformPay;
    }
 
    @Override
    public void process(JSONObject json) throws Exception {
 
 
        JSONObject extraData = new JSONObject();
        extraData.put("appid", GameAppProxy.appId);
        extraData.put("cpinfo", json.getString("cpInfo"));
        extraData.put("cporderid", json.getString("orderId"));
 
        final PayInfo mPayInfo = new PayInfo ();
        mPayInfo.setExtends_info_data (URLEncoder.encode(extraData.toString(), "utf-8").replace(" ",""));
        mPayInfo.setGame_level (json.getString("level"));
        mPayInfo.setGame_role_id (json.getString("roleID"));
        mPayInfo.setGame_role_name (json.getString("roleName").trim().replace(" ", ""));
        // 测试账号:x7demo 密码:123456(选择小号1进入游戏)
        mPayInfo.setGame_area (json.getString("sid"));
        // 测试账号:x7demo 密码:123456(选择小号1进入游戏) 小号名称:小号1  :对应的game_guid:2018642
        mPayInfo.setGame_guid (json.getString("game_guid"));
        mPayInfo.setGame_orderid (json.getString("orderId"));
        mPayInfo.setGame_price (json.getString("mount"));
        mPayInfo.setNotify_id (json.getString("notify_id"));
        mPayInfo.setSubject (json.getString("title"));
        mPayInfo.setGame_sign (json.getString("game_sign"));
 
        QuickSdkMgr.I.pay(mPayInfo);
 
    }
}