Skip to content

Commit

Permalink
BETA 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LeowWH committed Jan 18, 2017
1 parent 028ce8e commit 26126b4
Show file tree
Hide file tree
Showing 40 changed files with 27 additions and 36 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle → MOLPayXDK/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ android {

dependencies {
compile 'com.facebook.react:react-native:+'
compile 'com.molpay:molpay-mobile-xdk-android:3.7.0'
compile 'com.molpay:molpay-mobile-xdk-android:3.8.0'
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

#endif /* MOLPayReact_h */
// CalendarManager.h
#import "RCTBridgeModule.h"
#import <React/RCTBridgeModule.h>
#import <MOLPayXDK/MOLPayLib.h>

#import "RCTViewManager.h"
#import <React/RCTViewManager.h>

@interface MOLPayReactManager : NSObject <RCTBridgeModule>
@end
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

#import <Foundation/Foundation.h>
#import "MOLPayReactManager.h"
#import "RCTBridgeModule.h"
#import <React/RCTBridgeModule.h>


#import <MOLPayXDK/MOLPayLib.h>

#import "RCTView.h"
#import "RCTRootView.h"
#import <React/RCTView.h>
#import <React/RCTRootView.h>
#include "MOLPayReactViewController.h"

@interface MOLPayReactManager ()
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <meta name="description" content=""> <!-- <meta name="viewport" content="width=device-width"> --> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <meta name="format-detection" content="telephone=no"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <link rel="stylesheet" href="styles/vendor.34eb91d2.css"> <link rel="stylesheet" href="styles/main.d7e0b867.css"> </head> <body ng-app="molpayXsdkApp"> <div class="header"> </div> <div id="app-body" class="app-body container-fluid"> <div class="row"> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4" ng-view=""></div> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> </div> </div> <div ng-show="isStarting || isLoading" class="text-center"> <br> <p>Preparing...</p> <p>Please wait.</p> </div> <div class="footer"> </div> <div ng-show="isLoading || D7ARequeryActiveNow" class="loading text-center vertical-center"> <div class="loadingbackground"></div> <i class="fa fa-spinner fa-spin fa-3x"></i> <div class="loading-text">Loading...</div> </div> <script src="scripts/vendor.80b0fea7.js"></script> <script src="scripts/scripts.1aa69035.js"></script> </body> </html>
<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <meta name="description" content=""> <!-- <meta name="viewport" content="width=device-width"> --> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <meta name="format-detection" content="telephone=no"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <link rel="stylesheet" href="styles/vendor.34eb91d2.css"> <link rel="stylesheet" href="styles/main.d7e0b867.css"> </head> <body ng-app="molpayXsdkApp"> <div class="header"> </div> <div id="app-body" class="app-body container-fluid"> <div class="row"> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4" ng-view=""></div> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> </div> </div> <div ng-show="isStarting || isLoading" class="text-center"> <br> <p>{{label_preparing}}</p> <p>{{label_pleasewait}}</p> </div> <div class="footer"> </div> <div ng-show="isLoading || D7ARequeryActiveNow" class="loading text-center vertical-center"> <div class="loadingbackground"></div> <i class="fa fa-spinner fa-spin fa-3x"></i> <div class="loading-text">{{label_loading}}</div> </div> <script src="scripts/vendor.1780c687.js"></script> <script src="scripts/scripts.2d2ed87b.js"></script> </body> </html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ Credit card payment channel is not available in Android 4.1, 4.2, and 4.3. due t

## Installation

### Android

1) npm install https://github.com/MOLPay/molpay-mobile-xdk-reactnative-beta.git --save
1) git clone https://github.com/MOLPay/molpay-mobile-xdk-reactnative-beta.git or download the file by clicking clone or download

2) Copy and paste MOLPayXDK folder into node_module/

2) add the following import to `MainApplication.java` (`MainActivity.java` if RN < 0.33) of your application
### Android

3) add the following import to `MainApplication.java` (`MainActivity.java` if RN < 0.33) of your application

```java
import com.molpayxdk.MOLPayReact;
Expand Down Expand Up @@ -63,7 +66,7 @@ public class MainActivity extends ReactActivity {
}
```

3) add the following code to add the package to `MainApplication.java`` (`MainActivity.java` if RN < 0.33)
4) add the following code to add the package to `MainApplication.java`` (`MainActivity.java` if RN < 0.33)

```java
import com.molpayxdk.MOLPayReactPackage;
Expand All @@ -76,7 +79,7 @@ protected List<ReactPackage> getPackages() {
}
```

4) add the following codes to your `android/setting.gradle`
5) add the following codes to your `android/setting.gradle`

> you might have multiple 3rd party libraries, make sure that you don't create multiple include.
Expand All @@ -85,13 +88,13 @@ include ':app', ':MOLPayXDK'
project(':MOLPayXDK').projectDir = new File(rootProject.projectDir, '../node_modules/MOLPayXDK/android')
```

5) edit `android/app/build.gradle` and add the following line inside `dependencies`
6) edit `android/app/build.gradle` and add the following line inside `dependencies`

```
compile project(':MOLPayXDK')
```

6) run `react-native run-android` to see if everything is compilable.
7) run `react-native run-android` to see if everything is compilable.

if have any issue when run-android please make sure your `android/local.properties` already set sdk path

Expand All @@ -100,7 +103,7 @@ ndk.dir=path/Android/sdk/ndk-bundle
sdk.dir=path/Android/sdk
```

7) (Optional) header include Close button in payment UI
8) (Optional) header include Close button in payment UI
change the following codes in your `android/app/src/main/res/values/styles.xml`
```
<resources>
Expand All @@ -117,27 +120,25 @@ change the following codes in your `android/app/src/main/res/values/styles.xml`

### IOS

1) npm install https://github.com/MOLPay/molpay-mobile-xdk-reactnative-beta.git --save

2) navigate to `node_modules/MOLPayXDK/ios` and copy MOLPayXDK.bundle and MOLPayXDK.framework into the application project folder `{ReactProject}/ios/` and open Xcode to perform all imports.
3) navigate to `node_modules/MOLPayXDK/ios` and copy MOLPayXDK.bundle and MOLPayXDK.framework into the application project folder `{ReactProject}/ios/` and open Xcode to perform all imports.

<p align="center">
<img src ="https://raw.githubusercontent.com/MOLPay/molpay-mobile-xdk-reactnative-beta/master/assets/01.png" />
</p>
3) In Xcode right click on `Libraries` select `Add Files to ...` option and navigate to `node_modules/MOLPayXDK/ios` and add `MOLPayXDKlib.xcodeproj`
4) In Xcode right click on `Libraries` select `Add Files to ...` option and navigate to `node_modules/MOLPayXDK/ios` and add `MOLPayXDKlib.xcodeproj`


4) In Xcode click on project and find `Build Phases` then expand `Link Binary With Libraries` and click `+` sign to add a new library. select `libMOLPayXDKlib.a` and click `Add` button.
5) In Xcode click on project and find `Build Phases` then expand `Link Binary With Libraries` and click `+` sign to add a new library. select `libMOLPayXDKlib.a` and click `Add` button.

5) final result will be like below (please make sure the MOLPayXDK.bundle and MOLPayXDK.framework also included)
6) final result will be like below (please make sure the MOLPayXDK.bundle and MOLPayXDK.framework also included)

<p align="center">
<img src ="https://raw.githubusercontent.com/MOLPay/molpay-mobile-xdk-reactnative-beta/master/assets/02.png" />
</p>

6) Add 'App Transport Security Settings > Allow Arbitrary Loads > YES' to the application project info.plist
7) Add 'App Transport Security Settings > Allow Arbitrary Loads > YES' to the application project info.plist

7) Add 'NSPhotoLibraryUsageDescription' > 'Payment images' to the application project info.plist
8) Add 'NSPhotoLibraryUsageDescription' > 'Payment images' to the application project info.plist

## Sample Result

Expand Down

This file was deleted.

Binary file removed ios/MOLPayXDK.framework/Versions/A/MOLPayXDK
Binary file not shown.
10 changes: 0 additions & 10 deletions package.json

This file was deleted.

0 comments on commit 26126b4

Please sign in to comment.