Skip to content

Commit

Permalink
fix ios error
Browse files Browse the repository at this point in the history
  • Loading branch information
LeowWH committed Feb 19, 2017
1 parent eee179c commit 8dacebf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
9 changes: 5 additions & 4 deletions MOLPayXDK/ios/MOLPayReactManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 8dacebf

Please sign in to comment.