-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* impl callback gopay * fix gopay flow * refine result handler * refine handleGopayStatus
- Loading branch information
1 parent
c24aa4e
commit 0b93e12
Showing
13 changed files
with
149 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// MIDUrlHandler.h | ||
// MidtransCoreKit | ||
// | ||
// Created by Muhammad.Masykur on 01/11/18. | ||
// Copyright © 2018 Midtrans. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface MIDUrlHandler : NSObject | ||
|
||
+ (void)handleUrl:(NSURL *)url; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// MIDUrlHandler.m | ||
// MidtransCoreKit | ||
// | ||
// Created by Muhammad.Masykur on 01/11/18. | ||
// Copyright © 2018 Midtrans. All rights reserved. | ||
// | ||
|
||
#import "MIDUrlHandler.h" | ||
#import "MidtransConstant.h" | ||
|
||
@implementation MIDUrlHandler | ||
|
||
+ (void)handleUrl:(NSURL *)url { | ||
NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; | ||
for (NSString *param in [url.query componentsSeparatedByString:@"&"]) { | ||
NSArray *elts = [param componentsSeparatedByString:@"="]; | ||
if([elts count] < 2) continue; | ||
[params setObject:[elts lastObject] forKey:[elts firstObject]]; | ||
} | ||
|
||
[[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICATION_GOPAY_STATUS object:params]; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters