From 8dacebfa5423af756a5935aada95fa755027753c Mon Sep 17 00:00:00 2001 From: Leow Date: Mon, 20 Feb 2017 08:54:29 +0900 Subject: [PATCH] fix ios error --- .../android/src/main/java/com/molpayxdk/MOLPayReact.java | 2 +- MOLPayXDK/ios/MOLPayReactManager.m | 9 +++++---- package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/MOLPayXDK/android/src/main/java/com/molpayxdk/MOLPayReact.java b/MOLPayXDK/android/src/main/java/com/molpayxdk/MOLPayReact.java index 5987e32..4ee697e 100644 --- a/MOLPayXDK/android/src/main/java/com/molpayxdk/MOLPayReact.java +++ b/MOLPayXDK/android/src/main/java/com/molpayxdk/MOLPayReact.java @@ -78,7 +78,7 @@ public void setPaymentDetails(String str,@Nullable Callback successCallback, @Nu paymentDetails.put(MOLPayActivity.mp_bill_description_edit_disabled, obj.getString("mp_bill_description_edit_disabled")); paymentDetails.put("is_submodule", true); paymentDetails.put("module_id", "molpay-mobile-xdk-reactnative-beta-android"); - paymentDetails.put("wrapper_version", "0"); + paymentDetails.put("wrapper_version", "2"); }catch(Exception e){ if(this.errorCallback != null){ diff --git a/MOLPayXDK/ios/MOLPayReactManager.m b/MOLPayXDK/ios/MOLPayReactManager.m index 45002d2..7113287 100644 --- a/MOLPayXDK/ios/MOLPayReactManager.m +++ b/MOLPayXDK/ios/MOLPayReactManager.m @@ -29,12 +29,13 @@ @implementation MOLPayReactManager RCT_EXPORT_METHOD(setPaymentDetails:(NSDictionary *)paymentDetails callback:(RCTResponseSenderBlock)callback) { MOLPayReactViewController *mpvc = [[MOLPayReactViewController alloc] init]; + NSMutableDictionary *paymentDetailsMutable = paymentDetails; [mpvc.view setBackgroundColor:[UIColor whiteColor]]; - [paymentDetails setValue:@"YES" forKey:@"is_submodule"]; - [paymentDetails setValue:@"molpay-mobile-reactnative-beta-ios" forKey:@"module_id"]; - [paymentDetails setValue:@"1" forKey:@"wrapper_version"]; - mpvc.PaymentDetails = paymentDetails; + [paymentDetailsMutable setObject:@"YES" forKey:@"is_submodule"]; + [paymentDetailsMutable setObject:@"molpay-mobile-reactnative-beta-ios" forKey:@"module_id"]; + [paymentDetailsMutable setObject:@"2" forKey:@"wrapper_version"]; + mpvc.PaymentDetails = paymentDetailsMutable; UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:mpvc]; mpvc.didDismiss = ^(NSDictionary *data) { callback(@[data]); diff --git a/package.json b/package.json index 959bf86..efc0ebf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "MOLPayXDK", - "version": "0.9.1", + "version": "0.9.2", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start"