omnipay-reactnative-sdk 0.8.1 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,9 +102,9 @@ public class OmnipayActivityModule extends ReactContextBaseJavaModule {
102
102
  @ReactMethod
103
103
  public void initiateHorizonTransaction(double amt, String tranType, String colour, boolean print, String rrn, String stan, Promise promise) {
104
104
  try {
105
- Activity currentActivity = getCurrentActivity();
106
105
  mPromise = promise;
107
-
106
+ Activity currentActivity = getCurrentActivity();
107
+
108
108
  String purchase = "{" +
109
109
  "\"transType\": \"" + tranType + "\",\n" +
110
110
  "\"amount\": \"" + amt + "\",\n" +
@@ -139,7 +139,10 @@ public class OmnipayActivityModule extends ReactContextBaseJavaModule {
139
139
  String result = "-status-"+status+"-data-"+datax+"-message-"+statusMessage;
140
140
 
141
141
  // String returnValue = data.getStringExtra(returnKey);
142
- mPromise.resolve(result);
142
+ if(mPromise != null) {
143
+ mPromise.resolve(result);
144
+ }
145
+
143
146
  mPromise = null;
144
147
  }
145
148
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnipay-reactnative-sdk",
3
- "version": "0.8.1",
3
+ "version": "0.8.5",
4
4
  "description": "Omnipay react native sdk",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",