Skip to content

Commit

Permalink
Merge pull request #576 from veritrans/develop
Browse files Browse the repository at this point in the history
Release v 1.23.0
  • Loading branch information
uziwuzzy authored Oct 31, 2022
2 parents c9718f2 + 4d5a950 commit 7795875
Show file tree
Hide file tree
Showing 43 changed files with 388 additions and 546 deletions.
2 changes: 1 addition & 1 deletion MidtransCoreKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "MidtransCoreKit"
s.version = "1.22.0"
s.version = "1.23.0"
s.summary = "Veritrans mobile SDK beta version"
s.homepage = "https://veritrans.co.id/"
s.license = 'MIT'
Expand Down
6 changes: 4 additions & 2 deletions MidtransCoreKit/MidtransCoreKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/MidtransCoreKit",
Expand All @@ -1753,7 +1754,7 @@
"$(inherited)",
"$(PROJECT_DIR)/MidtransCoreKit/RG",
);
MARKETING_VERSION = 1.20.2;
MARKETING_VERSION = 1.23.0;
PRODUCT_BUNDLE_IDENTIFIER = com.midtrans.MidtransCoreKit;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1776,6 +1777,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/MidtransCoreKit",
Expand All @@ -1788,7 +1790,7 @@
"$(inherited)",
"$(PROJECT_DIR)/MidtransCoreKit/RG",
);
MARKETING_VERSION = 1.20.2;
MARKETING_VERSION = 1.23.0;
PRODUCT_BUNDLE_IDENTIFIER = com.midtrans.MidtransCoreKit;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down
2 changes: 1 addition & 1 deletion MidtransCoreKit/MidtransCoreKit/MidtransConstant.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* error domain
*/

static NSString * const MIDTRANS_SDK_CURRENT_VERSION = @"1.22.0";
static NSString * const MIDTRANS_SDK_CURRENT_VERSION = @"1.23.0";
static NSString * const MIDTRANS_CUSTOMFIELD_1 = @"custom_field1";
static NSString * const MIDTRANS_CUSTOMFIELD_2 = @"custom_field2";
static NSString * const MIDTRANS_CUSTOMFIELD_3 = @"custom_field3";
Expand Down
10 changes: 7 additions & 3 deletions MidtransCoreKit/MidtransCoreKit/MidtransImageManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
#import "MidtransConstant.h"
@implementation MidtransImageManager
+(void)getImageFromURLwithUrl:(NSString*)imageUrlString {
NSData *data = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:imageUrlString]];
[[NSUserDefaults standardUserDefaults] setObject:data forKey:MIDTRANS_CORE_MERCHANT_LOGO_KEY];
[[NSUserDefaults standardUserDefaults] synchronize];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSData *data = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:imageUrlString]];
dispatch_async(dispatch_get_main_queue(), ^{
[[NSUserDefaults standardUserDefaults] setObject:data forKey:MIDTRANS_CORE_MERCHANT_LOGO_KEY];
[[NSUserDefaults standardUserDefaults] synchronize];
});
});
}
+(UIImage *)merchantLogo {
return [UIImage imageWithData:(NSData *)[[NSUserDefaults standardUserDefaults] objectForKey:MIDTRANS_CORE_MERCHANT_LOGO_KEY]];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ - (void)viewDidLoad {
self.title = @"BRI E-Pay";
}
else if ([self.paymentIdentifier isEqualToString:MIDTRANS_PAYMENT_AKULAKU]) {
self.title = @"Akulaku";
self.title = @"Akulaku PayLater";
}
else if ([self.paymentIdentifier isEqualToString:MIDTRANS_PAYMENT_BCA_KLIKPAY]) {
self.title = @"BCA KlikPay";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
Virtual account number transaction, will not be nil if use bank transfer transaction except for Mandiri, because it's considered as Billpay
*/
@property (nonatomic, readonly) NSString *virtualAccountNumber;
@property (nonatomic, readonly) NSString *bank;

@property (nonatomic, readonly) NSURL *redirectURL;
@property (nonatomic,readonly) NSURL *qr_code_url;
Expand Down
2 changes: 2 additions & 0 deletions MidtransCoreKit/MidtransCoreKit/MidtransTransactionResult.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ @interface MidtransTransactionResult()
@property (nonatomic, readwrite) NSString *deeplinkUrl;
@property (nonatomic, readwrite) NSString *mandiriBillpayCompanyCode;
@property (nonatomic, readwrite) NSString *virtualAccountNumber;
@property (nonatomic, readwrite) NSString *bank;
@property (nonatomic, readwrite) NSURL *redirectURL;
@property (nonatomic, readwrite) NSURL *uobEzpayWebUrl;
@property (nonatomic, readwrite) NSURL *uobEzpayDeeplinkUrl;
Expand Down Expand Up @@ -85,6 +86,7 @@ - (instancetype)initWithTransactionResponse:(NSDictionary *)response {
if (response[@"va_numbers"]) {
NSDictionary *vaData = response[@"va_numbers"][0];
self.virtualAccountNumber = vaData[@"va_number"];
self.bank = vaData[@"bank"];
}
if (response[@"qr_code_url"]) {
self.qrcodeUrl = response[@"qr_code_url"];
Expand Down
2 changes: 1 addition & 1 deletion MidtransCoreKit/MidtransCoreKit/SNPUITrackingManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ - (NSMutableDictionary*)SNPUITrackingManageraddDefaultParameter{
[defaultParameters setObject:[MidtransHelper nullifyIfNil:token] forKey:@"token"];
[defaultParameters setObject:@"iOS" forKey:@"platform"];
[defaultParameters setObject:[MidtransDeviceHelper currentCPUUsage] forKey:@"cpu"];
[defaultParameters setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"] forKey:@"sdk version"];
[defaultParameters setObject:MIDTRANS_SDK_CURRENT_VERSION forKey:@"sdk version"];
[defaultParameters setObject:[MidtransDeviceHelper applicationName]?[MidtransDeviceHelper applicationName]:@"-" forKey:@"host_app"];

[defaultParameters setObject:[NSString stringWithFormat:@"width = %f, height = %f", [MidtransDeviceHelper screenSize].width, [MidtransDeviceHelper screenSize].height] forKey:@"screen_size"];
Expand Down
47 changes: 36 additions & 11 deletions MidtransDemo/MidtransDemo/MDNavigationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,47 @@ @interface MDNavigationViewController ()

@implementation MDNavigationViewController

static NSInteger const MIDTRANS_DEMO_PAYMENT_STATUS_BAR_TAG = 1002;

- (void)viewDidLoad {
[super viewDidLoad];

self.navigationBar.accessibilityIdentifier = @"demo_navbar";

self.navigationBar.titleTextAttributes = @{
NSFontAttributeName:[UIFont bariolRegularWithSize:21],
NSForegroundColorAttributeName:[UIColor mdDarkColor]
};
self.navigationBar.translucent = NO;
self.navigationBar.barTintColor = [UIColor whiteColor];
self.navigationBar.tintColor = [UIColor mdThemeColor];

[self setupNavigationBar];
defaults_observe_object(@"md_color", ^(NSNotification *note) {
self.navigationBar.tintColor = [UIColor mdThemeColor];
});
}

- (void)setupNavigationBar {
self.navigationBar.translucent = NO;
[self.navigationBar setBackgroundImage:[UIImage new]
forBarPosition:UIBarPositionAny
barMetrics:UIBarMetricsDefault];
[self.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
[self.navigationBar setShadowImage:[[UIImage alloc] init]];
self.navigationBar.tintColor = [[MidtransUIThemeManager shared] themeColor];

if (@available(iOS 15.0, *)) {
self.navigationBar.backgroundColor = [UIColor whiteColor];
self.navigationBar.titleTextAttributes = @{NSFontAttributeName:[[MidtransUIThemeManager shared].themeFont fontRegularWithSize:17],
NSForegroundColorAttributeName:[UIColor colorWithRed:3/255. green:3/255. blue:3/255. alpha:1]};
UIView * statusBarView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, [[UIApplication sharedApplication] statusBarFrame].size.height)];
statusBarView.backgroundColor = [UIColor whiteColor];
statusBarView.tag = MIDTRANS_DEMO_PAYMENT_STATUS_BAR_TAG;
[self.view addSubview:statusBarView];
} else {
self.navigationBar.titleTextAttributes = @{NSFontAttributeName:[[MidtransUIThemeManager shared].themeFont fontRegularWithSize:17],
NSForegroundColorAttributeName:[UIColor colorWithRed:3/255. green:3/255. blue:3/255. alpha:1]};
self.navigationBar.barTintColor = [UIColor whiteColor];
}
}

- (UIStatusBarStyle)preferredStatusBarStyle
{
if (@available(iOS 13.0, *)) {
return UIStatusBarStyleDarkContent;
} else {
return UIStatusBarStyleDefault;
}
}

@end
2 changes: 1 addition & 1 deletion MidtransDemo/MidtransDemo/MDOptionsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (void)initConfiguration{
[MDOption optionGeneralWithName:@"Alfamart" value:@(MidtransPaymentFeatureAlfamart)],
[MDOption optionGeneralWithName:@"CIMB Clicks" value:@(MidtransPaymentFeatureCIMBClicks)],
[MDOption optionGeneralWithName:@"BRI Epay" value:@(MidtransPaymentFeatureBRIEpay)],
[MDOption optionGeneralWithName:@"Akulaku" value:@(MidtransPaymentFeatureAkulaku)],
[MDOption optionGeneralWithName:@"Akulaku PayLater" value:@(MidtransPaymentFeatureAkulaku)],
[MDOption optionGeneralWithName:@"Danamon Online" value:@(MidtransPaymentFeatureDanamonOnline)],
[MDOption optionGeneralWithName:@"Gopay" value:@(MidtransPaymentFeatureGOPAY)],
[MDOption optionGeneralWithName:@"ShopeePay" value:@(MidtransPaymentFeatureShopeePay)],
Expand Down
4 changes: 4 additions & 0 deletions MidtransDemo/MidtransDemo/payment_channels.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,9 @@
{
"type": "uob_ezpay",
"name": "UOB Ezpay"
},
{
"type": "akulaku",
"name": "Akulaku PayLater"
}
]
4 changes: 2 additions & 2 deletions MidtransKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "MidtransKit"
s.version = "1.22.0"
s.version = "1.23.0"
s.summary = "Veritrans mobile SDK beta version"
s.homepage = "https://veritrans.co.id/"
s.license = 'MIT'
Expand All @@ -17,7 +17,7 @@ s.source_files = 'MidtransKit/MidtransKit/**/*.{h,m}'
s.resource_bundles = {
'MidtransKit' => ['MidtransKit/MidtransKit/resources/*']
}
s.dependency 'MidtransCoreKit', '1.22.0'
s.dependency 'MidtransCoreKit', '1.23.0'
s.static_framework = true
s.default_subspec = 'UI'

Expand Down
Loading

0 comments on commit 7795875

Please sign in to comment.