Approach 2 Adding Page object to PageMap based on pageType oneTimeWebPunchOut
This commit is contained in:
parent
fba2e80b8a
commit
5e62e159a0
@ -355,6 +355,49 @@
|
||||
NSData *prettyData = [NSJSONSerialization dataWithJSONObject:jsonObject options:NSJSONWritingPrettyPrinted error:&error];
|
||||
NSString *responseString = [[NSString alloc] initWithData:prettyData encoding:NSUTF8StringEncoding];
|
||||
MVMCoreNetworkLog(@"Response for Request Page Type %@:\n%@",requestParameters.pageType, responseString);
|
||||
NSMutableDictionary *newjsonPageObjDict = nil;
|
||||
NSMutableDictionary *newjsonObjectDict = nil;
|
||||
if ([requestParameters.pageType isEqual:@"cancelTouchId"] || [requestParameters.pageType isEqual:@"shopTabWebpunchout"]) {
|
||||
// Page
|
||||
// shopTabWebpunchout
|
||||
if ([jsonObject isKindOfClass:[NSDictionary class]]){
|
||||
NSDictionary *dict = (NSDictionary*)jsonObject;
|
||||
NSMutableDictionary *newjsonObjectDict = [dict mutableCopy];
|
||||
newjsonPageObjDict = [[dict valueForKey:@"Page"] mutableCopy];
|
||||
NSString *templateValue = [newjsonPageObjDict valueForKey:@"template"];
|
||||
NSLog(@"templateDict : %@",templateValue);
|
||||
NSLog(@"NEW JSON OBJECT DICT : %@",newjsonObjectDict);
|
||||
if ([templateValue isEqualToString:@"webPunchOut"]) {
|
||||
NSLog(@"PageObject : %@",newjsonPageObjDict);
|
||||
[newjsonPageObjDict setValue:@"oneTimeWebpunchout" forKey:@"pageType"];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:newjsonPageObjDict forKey:@"pageObj"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
} else if([requestParameters.pageType isEqualToString:@"atomicAccountLanding"]) {
|
||||
if ([jsonObject isKindOfClass:[NSDictionary class]]) {
|
||||
NSDictionary *dict = (NSDictionary*)jsonObject;
|
||||
NSMutableDictionary *newjsonObjectDict = [dict mutableCopy];
|
||||
NSMutableDictionary *newPageObj = [[NSUserDefaults standardUserDefaults]dictionaryForKey:@"pageObj"];
|
||||
NSMutableDictionary *changePageType = [NSMutableDictionary dictionaryWithDictionary:@{
|
||||
@"pageType":@"oneTimeWebpunchout"
|
||||
}];
|
||||
NSMutableDictionary *pageInfo = [NSMutableDictionary dictionaryWithDictionary:@{
|
||||
@"oneTimeWebpunchout":newPageObj
|
||||
}];
|
||||
[newjsonObjectDict setObject: pageInfo forKey:@"PageMap"];
|
||||
NSLog(@"ONE TIME WEB PUNCHOUT 77: %@", newjsonObjectDict);
|
||||
jsonObject = newjsonObjectDict;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
// Empty response.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user