| | |
| | | static NSString* sGameID; |
| | | static NSString* sUserName; |
| | | static NSThread* _thread; |
| | | static NSString* channel; |
| | | |
| | | -(id)init |
| | | { |
| | |
| | | NSDictionary *userInfo = [notify userInfo]; |
| | | if (error == 0) { |
| | | NSString *uid = [[SMPCQuickSDK defaultInstance] userId]; |
| | | NSString *channel =[[SMPCQuickSDK defaultInstance] getConfigValue:@"channel"]; |
| | | NSString *gameUID; |
| | | channel = [[SMPCQuickSDK defaultInstance] getConfigValue:@"channel"]; |
| | | if(channel&&[channel length]!=0) |
| | | gameUID = [NSString stringWithFormat:@"%@%@%@", uid,@"@",channel]; |
| | | { |
| | | |
| | | } |
| | | else |
| | | gameUID = [NSString stringWithFormat:@"%@@%d", uid, [SMPCQuickSDK defaultInstance].channelType]; |
| | | { |
| | | channel = [NSString stringWithFormat:@"%d", [SMPCQuickSDK defaultInstance].channelType]; |
| | | } |
| | | NSString *gameUID = [NSString stringWithFormat:@"%@@%@", uid, channel]; |
| | | NSString *UserName = [[SMPCQuickSDK defaultInstance] userId]; |
| | | //获取user_token,用于从服务器去验证用户信息 |
| | | NSString *user_token = userInfo[kSmpcQuickSDKKeyUserToken]; |
| | |
| | | // _appid = sAppID; |
| | | // } |
| | | NSString *_appid = sAppID; |
| | | order.extrasParams = [NSString stringWithFormat:@"{\"appid\":\"%@\",\"cpinfo\":\"%@\",\"cporderid\":\"%@\"}", |
| | | order.extrasParams = [NSString stringWithFormat:@"{\"appid\":\"%@\",\"cpinfo\":\"%@\",\"cporderid\":\"%@\",\"serverid\":\"%@\",\"channelID\":\"%@\"}", |
| | | _appid, |
| | | [_dict objectForKey:@"cpInfo"], |
| | | [_dict objectForKey:@"orderId"] |
| | | [_dict objectForKey:@"orderId"], |
| | | [_dict objectForKey:@"sid"], |
| | | channel |
| | | ]; |
| | | // //个别渠道要求单价*数量==总价 |
| | | // if([SMPCQuickSDK defaultInstance].channelType == 9999){ |