kevin 9 年之前
父节点
当前提交
3e742f22fa

二进制
zj-pay/Non-Stop.zip


+ 7 - 7
zj-pay/Non-Stop/Non-Stop/ViewController.m

@ -53,9 +53,9 @@
53 53
    NSString *version = [NSString stringWithFormat:@"IOS %@",[UIDevice currentDevice].systemVersion];
54 54
    [BusiData setObject:version forKey:@"Version"];
55 55
    
56
//    NSDictionary *pubinfo = nil, *busiData = nil;
57
//    NSError *error = nil;
58
//    BOOL isValid = TRUE;
56
    NSDictionary *pubinfo = nil, *busiData = nil;
57
    NSError *error = nil;
58
    BOOL isValid = TRUE;
59 59
    //2.业务请求
60 60
    [[AIHttpHelper sharedClient] httpPostBusiCode:SIGNMENT_QUERY RequesetParams:BusiData loadingText:@"我在加载" AndFinishBlock:^(NSDictionary *pubinfo, NSDictionary *busiData, NSError *error, BOOL isValid) {
61 61
    
@ -86,15 +86,15 @@
86 86
            
87 87
            //最近使用的银行卡信息
88 88
            id bankCardInfo = [busiData objectForKey:@"BankCardInfo"];
89
            NSMutableArray *UsedBankCardNoarr=[[NSMutableArray alloc]init];
90
            NSMutableArray *UsedContractNoarr=[[NSMutableArray alloc] init];
89
            NSMutableArray *UsedBankCardNoarr = [[NSMutableArray alloc] init];
90
            NSMutableArray *UsedContractNoarr = [[NSMutableArray alloc] init];
91 91
            
92 92
            if([bankCardInfo isKindOfClass:[NSDictionary class]]){
93 93
                [UsedBankCardNoarr addObject:[(NSDictionary *)bankCardInfo objectForKey:@"UsedBankCardNo"]];
94 94
                [UsedContractNoarr addObject:[(NSDictionary *)bankCardInfo objectForKey:@"UsedContractNo"]];
95 95
                
96 96
            }else if([bankCardInfo isKindOfClass:[NSArray class]]){
97
                NSArray *bankcardArr=(NSArray *)bankCardInfo;
97
                NSArray *bankcardArr = (NSArray *)bankCardInfo;
98 98
                for(NSDictionary *dic in bankcardArr){
99 99
                    [UsedBankCardNoarr addObject:[dic objectForKey:@"UsedBankCardNo"]];
100 100
                    [UsedContractNoarr addObject:[dic objectForKey:@"UsedContractNo"]];
@ -167,7 +167,7 @@
167 167
    [bindInfo setObject:@"8714" forKey:@"BankCardNo"];
168 168
    
169 169
    [bankCardInfo setObject:[NSArray arrayWithObjects:@"6164",@"3944", nil] forKey:@"UsedBankCardNo"];
170
    [bankCardInfo setObject:@"100004815788" forKey:@"UsedContractNo"];
170
    [bankCardInfo setObject:@"500004815051" forKey:@"UsedContractNo"];
171 171
    
172 172
    [dic setObject:bindInfo forKey:@"BindInfo"];
173 173
    [dic setObject:bankCardInfo forKey:@"BankCardInfo"];

+ 1 - 1
zj-pay/Non-Stop/Non-Stop/res/pay.json

@ -21,7 +21,7 @@
21 21
            "TransactionDate":"20151117113020",
22 22
            "TransactionId":"2430111730113510172524",
23 23
            "VerifyCode":"",
24
            "Version":"1.1"
24
            "Version":"1.2"
25 25
        }
26 26
    }
27 27
}

+ 6 - 1
zj-pay/Non-Stop/Non-Stop/src/non-stop/AI_BusiAcceptanceVC.m

@ -191,7 +191,12 @@
191 191
        [AIUtils log:@"取消签约" :pubInfo :busiData :error];
192 192
        
193 193
        AI_CancelBusiVC *sin = [[AI_CancelBusiVC alloc] initWithBundleNib];
194
        sin.suc = busiData == nil || error ? 0 : -1;
194
        sin.suc = -1;
195
        //校验数据失败
196
        if(busiData != nil && error && [@"SUCCESS" isEqualToString:busiData[@"Status"]]){
197
            sin.suc = 0;
198
            NSLog(@"取消签约结果:%@.", [AIUtils replaceUnicode:busiData[@"StatusInfo"]]);
199
        }
195 200
        
196 201
        UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:sin];
197 202
        [self presentViewController:nav animated:NO completion:nil];

+ 16 - 3
zj-pay/Non-Stop/Non-Stop/src/non-stop/AI_DoBusiForUnionVC.m

@ -72,12 +72,13 @@
72 72
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
73 73
    
74 74
    NSMutableDictionary *signReqData = [NSMutableDictionary dictionary];
75
//    [busiData setValue:@"" forKey:@"DoneSeq"];//工单号码
76 75
    [signReqData setValue:@"1" forKey:@"AccountType"];//客户业务平台帐户类型
77 76
    [signReqData setValue:[defaults objectForKey:@"AccountCode"] forKey:@"AccountCode"];
78 77
    [signReqData setValue:[defaults objectForKey:@"AccountName"] forKey:@"AccountName"];
79 78
    [signReqData setValue:BUSINESS_TYPE forKey:@"PayItemType"];//业务类型
80
    [signReqData setValue:[defaults objectForKey:@"UsedContractNo"] forKey:@"ContractNo"];
79
    
80
    NSString *usedContractNo = [self getUsedContractNo:defaults];
81
    [signReqData setValue:usedContractNo forKey:@"ContractNo"];
81 82
    //2.请求
82 83
    [[AIHttpHelper sharedClient] httpPostBusiCode:SIGNMENT_YCZ RequesetParams:signReqData loadingText:@"正在签约校验,请稍后..." AndFinishBlock:^(NSDictionary *pubInfo, NSDictionary *busiData, NSError *error, BOOL isValid) {
83 84
        
@ -196,5 +197,17 @@
196 197
            selImage.image = [UIImage imageNamed:@"AI-bank-not-choose.png"];
197 198
    }
198 199
}
199
200
/**
201
 * 根据选择的银行卡号码,获取对应的contractNo
202
 */
203
- (NSString *) getUsedContractNo:(NSUserDefaults *)defaults{
204
    NSString *usedContractNo = nil;
205
    NSArray *usedBankCardList = [defaults objectForKey:@"UsedBankCardNo"], *usedContractList = [defaults objectForKey:@"UsedContractNo"];
206
    for(int i = 0, len = (int)usedBankCardList.count; i < len; i++){
207
        NSString *usedBankCard = usedBankCardList[i];
208
        if([selectedBankNo isEqualToString:usedBankCard])
209
            usedContractNo = usedContractList[i];
210
    }
211
    return usedContractNo;
212
}
200 213
@end

+ 5 - 4
zj-pay/Non-Stop/Non-Stop/src/non-stop/AI_HadSignContractVCViewController.m

@ -167,13 +167,14 @@
167 167
    //2.请求
168 168
    [[AIHttpHelper sharedClient] httpPostBusiCode:SIGNMENT_CANCEL RequesetParams:cancelData loadingText:@"正在取消签约,请稍后..." AndFinishBlock:^(NSDictionary *pubInfo, NSDictionary *busiData, NSError *error, BOOL isValid) {
169 169
        
170
        [AIUtils log:@"微信签约" :pubInfo :busiData :error];
170
        [AIUtils log:@"取消微信签约" :pubInfo :busiData :error];
171 171
        
172 172
        AI_CancelBusiVC *sin = [[AI_CancelBusiVC alloc] init];
173
        sin.suc = 0;
173
        sin.suc = -1;
174 174
        //校验数据失败
175
        if(busiData == nil || error){
176
            sin.suc = -1;
175
        if(busiData != nil && error && [@"SUCCESS" isEqualToString:busiData[@"Status"]]){
176
            sin.suc = 0;
177
            NSLog(@"取消签约结果:%@.", [AIUtils replaceUnicode:busiData[@"StatusInfo"]]);
177 178
        }
178 179
        
179 180
        UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:sin];

+ 7 - 0
zj-pay/Non-Stop/Non-Stop/src/util/AIHttpHelper.m

@ -204,6 +204,13 @@
204 204
    NSString *acctName = BusiData[@"AccountName"]; //用户姓名
205 205
    
206 206
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
207
    //清空原有内容
208
    NSDictionary *dictionary = [userDefaults dictionaryRepresentation];
209
    for(NSString* key in [dictionary allKeys]){
210
        [userDefaults removeObjectForKey:key];
211
    }
212
    [userDefaults synchronize];
213
    
207 214
    [userDefaults setObject:privateKey forKey:@"privateKey"];
208 215
    [userDefaults setObject:publicKey forKey:@"publicKey"];
209 216
    [userDefaults setObject:PubInfo forKey:@"PubInfo"];

+ 2 - 0
zj-pay/Non-Stop/Non-Stop/src/util/AIUtils.h

@ -58,4 +58,6 @@
58 58
+(NSString *) splitStrWithStep:(NSString *)srcStr :(int) step :(NSString *)fillStr;
59 59
//日志打印
60 60
+(void)log:(NSString *)msg :(NSDictionary *)pubData :(NSDictionary *)busiData :(NSError *)error;
61
//将unicode字符转成中文
62
+ (NSString *)replaceUnicode:(NSString *)unicodeStr;
61 63
@end

+ 15 - 0
zj-pay/Non-Stop/Non-Stop/src/util/AIUtils.m

@ -357,4 +357,19 @@
357 357
    NSLog(@"%@_业务参数:%@.", msg, busiData);
358 358
    NSLog(@"%@_错误信息:%d \n, %@.", msg, error == nil, [error description]);
359 359
}
360
/**
361
 * unicode转中文
362
 */
363
+ (NSString *)replaceUnicode:(NSString *)unicodeStr{
364
    
365
    NSString *tempStr1 = [unicodeStr stringByReplacingOccurrencesOfString:@"\\u"withString:@"\\U"];
366
    NSString *tempStr2 = [tempStr1 stringByReplacingOccurrencesOfString:@"\""withString:@"\\\""];
367
    NSString *tempStr3 = [[@"\""stringByAppendingString:tempStr2] stringByAppendingString:@"\""];
368
    NSData *tempData = [tempStr3 dataUsingEncoding:NSUTF8StringEncoding];
369
    NSString* returnStr = [NSPropertyListSerialization propertyListFromData:tempData
370
                                                           mutabilityOption:NSPropertyListImmutable
371
                                                                     format:NULL
372
                                                           errorDescription:NULL];
373
    return [returnStr stringByReplacingOccurrencesOfString:@"\\r\\n"withString:@"\n"];
374
}
360 375
@end

+ 3 - 1
zj-pay/Non-Stop/Non-Stop/src/util/AIconst.h

@ -50,7 +50,9 @@
50 50
//银联成功
51 51
#define DIALOG_UP_SUCCESS       4896
52 52
53
#define  V_URL  @"http://10.73.142.141:8080/dev/PhoneAppPay"
53
54
#define  V_URL  @"http://218.205.68.40:8000/PhoneAppPay"
55
//#define  V_URL  @"http://10.73.142.101:8080/dev/PhoneAppPay"
54 56
55 57
#define PAY_TYPE_WEBCHAT        6001
56 58
#define PAY_TYPE_UNIONPAY       6002

+ 80 - 0
zj-pay/zjpaylib/zjpaylib.xcodeproj/xcuserdata/kevin.xcuserdatad/xcschemes/AIResource.xcscheme

@ -0,0 +1,80 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<Scheme
3
   LastUpgradeVersion = "0700"
4
   version = "1.3">
5
   <BuildAction
6
      parallelizeBuildables = "YES"
7
      buildImplicitDependencies = "YES">
8
      <BuildActionEntries>
9
         <BuildActionEntry
10
            buildForTesting = "YES"
11
            buildForRunning = "YES"
12
            buildForProfiling = "YES"
13
            buildForArchiving = "YES"
14
            buildForAnalyzing = "YES">
15
            <BuildableReference
16
               BuildableIdentifier = "primary"
17
               BlueprintIdentifier = "EAFA8FE51A788C84007F7B60"
18
               BuildableName = "AIResource.bundle"
19
               BlueprintName = "AIResource"
20
               ReferencedContainer = "container:zjpaylib.xcodeproj">
21
            </BuildableReference>
22
         </BuildActionEntry>
23
      </BuildActionEntries>
24
   </BuildAction>
25
   <TestAction
26
      buildConfiguration = "Debug"
27
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
      shouldUseLaunchSchemeArgsEnv = "YES">
30
      <Testables>
31
      </Testables>
32
      <AdditionalOptions>
33
      </AdditionalOptions>
34
   </TestAction>
35
   <LaunchAction
36
      buildConfiguration = "Debug"
37
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
38
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
39
      launchStyle = "0"
40
      useCustomWorkingDirectory = "NO"
41
      ignoresPersistentStateOnLaunch = "NO"
42
      debugDocumentVersioning = "YES"
43
      debugServiceExtension = "internal"
44
      allowLocationSimulation = "YES">
45
      <MacroExpansion>
46
         <BuildableReference
47
            BuildableIdentifier = "primary"
48
            BlueprintIdentifier = "EAFA8FE51A788C84007F7B60"
49
            BuildableName = "AIResource.bundle"
50
            BlueprintName = "AIResource"
51
            ReferencedContainer = "container:zjpaylib.xcodeproj">
52
         </BuildableReference>
53
      </MacroExpansion>
54
      <AdditionalOptions>
55
      </AdditionalOptions>
56
   </LaunchAction>
57
   <ProfileAction
58
      buildConfiguration = "Release"
59
      shouldUseLaunchSchemeArgsEnv = "YES"
60
      savedToolIdentifier = ""
61
      useCustomWorkingDirectory = "NO"
62
      debugDocumentVersioning = "YES">
63
      <MacroExpansion>
64
         <BuildableReference
65
            BuildableIdentifier = "primary"
66
            BlueprintIdentifier = "EAFA8FE51A788C84007F7B60"
67
            BuildableName = "AIResource.bundle"
68
            BlueprintName = "AIResource"
69
            ReferencedContainer = "container:zjpaylib.xcodeproj">
70
         </BuildableReference>
71
      </MacroExpansion>
72
   </ProfileAction>
73
   <AnalyzeAction
74
      buildConfiguration = "Debug">
75
   </AnalyzeAction>
76
   <ArchiveAction
77
      buildConfiguration = "Release"
78
      revealArchiveInOrganizer = "YES">
79
   </ArchiveAction>
80
</Scheme>

+ 80 - 0
zj-pay/zjpaylib/zjpaylib.xcodeproj/xcuserdata/kevin.xcuserdatad/xcschemes/zjpaylib.xcscheme

@ -0,0 +1,80 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<Scheme
3
   LastUpgradeVersion = "0700"
4
   version = "1.3">
5
   <BuildAction
6
      parallelizeBuildables = "YES"
7
      buildImplicitDependencies = "YES">
8
      <BuildActionEntries>
9
         <BuildActionEntry
10
            buildForTesting = "YES"
11
            buildForRunning = "YES"
12
            buildForProfiling = "YES"
13
            buildForArchiving = "YES"
14
            buildForAnalyzing = "YES">
15
            <BuildableReference
16
               BuildableIdentifier = "primary"
17
               BlueprintIdentifier = "EAFA8E5D1A787E5D007F7B60"
18
               BuildableName = "zjpaylib.framework"
19
               BlueprintName = "zjpaylib"
20
               ReferencedContainer = "container:zjpaylib.xcodeproj">
21
            </BuildableReference>
22
         </BuildActionEntry>
23
      </BuildActionEntries>
24
   </BuildAction>
25
   <TestAction
26
      buildConfiguration = "Debug"
27
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
      shouldUseLaunchSchemeArgsEnv = "YES">
30
      <Testables>
31
      </Testables>
32
      <AdditionalOptions>
33
      </AdditionalOptions>
34
   </TestAction>
35
   <LaunchAction
36
      buildConfiguration = "Debug"
37
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
38
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
39
      launchStyle = "0"
40
      useCustomWorkingDirectory = "NO"
41
      ignoresPersistentStateOnLaunch = "NO"
42
      debugDocumentVersioning = "YES"
43
      debugServiceExtension = "internal"
44
      allowLocationSimulation = "YES">
45
      <MacroExpansion>
46
         <BuildableReference
47
            BuildableIdentifier = "primary"
48
            BlueprintIdentifier = "EAFA8E5D1A787E5D007F7B60"
49
            BuildableName = "zjpaylib.framework"
50
            BlueprintName = "zjpaylib"
51
            ReferencedContainer = "container:zjpaylib.xcodeproj">
52
         </BuildableReference>
53
      </MacroExpansion>
54
      <AdditionalOptions>
55
      </AdditionalOptions>
56
   </LaunchAction>
57
   <ProfileAction
58
      buildConfiguration = "Release"
59
      shouldUseLaunchSchemeArgsEnv = "YES"
60
      savedToolIdentifier = ""
61
      useCustomWorkingDirectory = "NO"
62
      debugDocumentVersioning = "YES">
63
      <MacroExpansion>
64
         <BuildableReference
65
            BuildableIdentifier = "primary"
66
            BlueprintIdentifier = "EAFA8E5D1A787E5D007F7B60"
67
            BuildableName = "zjpaylib.framework"
68
            BlueprintName = "zjpaylib"
69
            ReferencedContainer = "container:zjpaylib.xcodeproj">
70
         </BuildableReference>
71
      </MacroExpansion>
72
   </ProfileAction>
73
   <AnalyzeAction
74
      buildConfiguration = "Debug">
75
   </AnalyzeAction>
76
   <ArchiveAction
77
      buildConfiguration = "Release"
78
      revealArchiveInOrganizer = "YES">
79
   </ArchiveAction>
80
</Scheme>