@jimrising/easymerchantsdk-react-native 1.5.7 → 1.5.9

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.
Files changed (28) hide show
  1. package/README.md +5 -5
  2. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
  3. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$2.dex +0 -0
  4. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
  5. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  6. package/android/build/.transforms/e9a664a11ce12edf79cd87b1e07aa243/transformed/classes/classes_dex/classes.dex +0 -0
  7. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  8. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
  9. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$2.class +0 -0
  10. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
  11. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
  12. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$2.class +0 -0
  13. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
  14. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  15. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$1.class.uniqueId2 +0 -0
  16. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$2.class.uniqueId0 +0 -0
  17. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule.class.uniqueId3 +0 -0
  18. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  19. package/android/build.gradle +1 -4
  20. package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkModule.java +197 -86
  21. package/ios/Classes/EasyMerchantSdk.m +2 -2
  22. package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +7 -2
  23. package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +7 -2
  24. package/ios/Pods/ViewControllers/OTPVerificationVC.swift +1 -1
  25. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +36 -8
  26. package/ios/easymerchantsdk.podspec +1 -1
  27. package/ios/easymerchantsdk.storyboard +89 -207
  28. package/package.json +1 -1
package/README.md CHANGED
@@ -7,7 +7,7 @@ To add the path of sdk in your project. Open your `package.json` file and inside
7
7
 
8
8
  ```json
9
9
  "dependencies": {
10
- "@jimrising/easymerchantsdk-react-native": "^1.5.7"
10
+ "@jimrising/easymerchantsdk-react-native": "^1.5.9"
11
11
  },
12
12
  ```
13
13
 
@@ -24,11 +24,11 @@ allprojects {
24
24
  google()
25
25
  mavenCentral()
26
26
  maven { url 'https://jitpack.io' }
27
- maven {
28
- url = uri("https://maven.pkg.github.com/EasyMerchant/em-MobileCheckoutSDK-Android")
27
+ maven {
28
+ url = uri(properties.getProperty('GITHUB_URL'))
29
29
  credentials {
30
- username = "EasyMerchant"
31
- password = "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"
30
+ username = properties.getProperty('GITHUB_USERNAME')
31
+ password = properties.getProperty('GITHUB_PASSWORD')
32
32
  }
33
33
  }
34
34
  }
@@ -39,14 +39,11 @@ repositories {
39
39
  }
40
40
 
41
41
  dependencies {
42
- implementation 'com.app:paysdk:1.2.8'
42
+ implementation 'com.app:paysdk:1.2.9'
43
43
  implementation 'com.hbb20:ccp:2.7.3'
44
44
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1"
45
45
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1"
46
46
  implementation 'com.github.androidmads:QRGenerator:1.0.1'
47
- // implementation('com.microblink:blinkcard:2.10.0@aar') {
48
- // transitive = true
49
- // }
50
47
  implementation 'androidx.appcompat:appcompat:1.6.1'
51
48
  implementation 'com.google.android.material:material:1.8.0'
52
49
  implementation 'com.facebook.react:react-native:+'
@@ -4,14 +4,14 @@ import android.app.Activity;
4
4
  import androidx.annotation.NonNull;
5
5
  import com.app.paysdk.init.EasyPaymentFactory;
6
6
  import com.app.paysdk.service.EasyPaymentService;
7
- import com.facebook.react.bridge.ReactApplicationContext;
8
- import com.facebook.react.bridge.ReactContextBaseJavaModule;
9
- import com.facebook.react.bridge.ReactMethod;
10
- import com.facebook.react.bridge.Promise;
11
- import com.facebook.react.bridge.ReadableMap;
12
- import com.facebook.react.bridge.WritableMap;
13
- import com.facebook.react.bridge.Arguments;
14
- import org.json.JSONObject;
7
+ import com.facebook.react.bridge.*;
8
+ import org.json.*;
9
+ import java.util.Map;
10
+
11
+ import java.io.File;
12
+ import java.io.FileInputStream;
13
+ import java.io.IOException;
14
+ import java.util.Properties;
15
15
 
16
16
  public class RNEasymerchantsdkModule extends ReactContextBaseJavaModule {
17
17
  private final ReactApplicationContext reactContext;
@@ -27,14 +27,16 @@ public class RNEasymerchantsdkModule extends ReactContextBaseJavaModule {
27
27
  return "RNEasymerchantsdk";
28
28
  }
29
29
 
30
- @ReactMethod
31
- public void platformVersion(Promise promise) {
30
+ private Properties loadConfigProperties() {
31
+ Properties properties = new Properties();
32
32
  try {
33
- String platformVersion = "Android " + android.os.Build.VERSION.RELEASE;
34
- promise.resolve(platformVersion);
35
- } catch (Exception e) {
36
- promise.reject("PLATFORM_ERROR", "Failed to get platform version: " + e.getMessage());
33
+ FileInputStream fis = new FileInputStream(new File(reactContext.getFilesDir(), "../config.properties"));
34
+ properties.load(fis);
35
+ fis.close();
36
+ } catch (IOException e) {
37
+ android.util.Log.e("RNEasymerchantsdk", "Failed to load config.properties: " + e.getMessage());
37
38
  }
39
+ return properties;
38
40
  }
39
41
 
40
42
  @ReactMethod
@@ -45,65 +47,171 @@ public class RNEasymerchantsdkModule extends ReactContextBaseJavaModule {
45
47
  return;
46
48
  }
47
49
 
48
- try {
49
- // Validate required fields
50
- if (!configMap.hasKey("amount") || configMap.getString("amount") == null || configMap.getString("amount").isEmpty() || Float.parseFloat(configMap.getString("amount")) <= 0) {
51
- promise.reject("VALIDATION_ERROR", "Invalid or missing amount.");
52
- return;
53
- }
54
- if (!configMap.hasKey("apiKey") || configMap.getString("apiKey") == null || configMap.getString("apiKey").isEmpty()) {
55
- promise.reject("VALIDATION_ERROR", "Missing or empty apiKey.");
56
- return;
57
- }
58
- if (!configMap.hasKey("secretKey") || configMap.getString("secretKey") == null || configMap.getString("secretKey").isEmpty()) {
59
- promise.reject("VALIDATION_ERROR", "Missing or empty secretKey.");
60
- return;
61
- }
62
- if (!configMap.hasKey("jsonConfig") || configMap.getMap("jsonConfig") == null) {
63
- promise.reject("VALIDATION_ERROR", "Missing jsonConfig.");
64
- return;
65
- }
50
+ new android.os.Handler(android.os.Looper.getMainLooper()).post(() -> {
51
+ try {
52
+ Properties configProps = loadConfigProperties();
53
+ String defaultApiKey = configProps.getProperty("SDK_API_KEY");
54
+ String defaultSecretKey = configProps.getProperty("SDK_SECRET_KEY");
66
55
 
67
- String amount = configMap.getString("amount");
68
- String apiKey = configMap.getString("apiKey");
69
- String secretKey = configMap.getString("secretKey");
70
- JSONObject jsonConfig = new JSONObject(configMap.getMap("jsonConfig").toHashMap());
56
+ String amount = configMap.getString("amount");
57
+ String apiKey = configMap.hasKey("apiKey") ? configMap.getString("apiKey") : defaultApiKey;
58
+ String secretKey = configMap.hasKey("secretKey") ? configMap.getString("secretKey") : defaultSecretKey;
71
59
 
72
- String environment = jsonConfig.optString("environment", "sandbox").toLowerCase();
73
- if (!environment.equals("staging") && !environment.equals("sandbox") && !environment.equals("production")) {
74
- promise.reject("CONFIG_ERROR", "Invalid environment: " + environment);
75
- return;
76
- }
60
+ ReadableMap jsonConfigMap = configMap.getMap("jsonConfig");
61
+ JSONObject jsonConfig = new JSONObject();
62
+ jsonConfig.put("environment",
63
+ jsonConfigMap.hasKey("environment") ? jsonConfigMap.getString("environment") : "sandbox"
64
+ );
65
+ jsonConfig.put("amount", amount);
66
+ jsonConfig.put("tokenOnly",
67
+ jsonConfigMap.hasKey("tokenOnly") ? jsonConfigMap.getBoolean("tokenOnly") : false
68
+ );
69
+ jsonConfig.put("currency",
70
+ jsonConfigMap.hasKey("currency") ? jsonConfigMap.getString("currency") : "usd"
71
+ );
72
+ jsonConfig.put("saveCard",
73
+ jsonConfigMap.hasKey("saveCard") ? jsonConfigMap.getBoolean("saveCard") : false
74
+ );
75
+ jsonConfig.put("saveAccount",
76
+ jsonConfigMap.hasKey("saveAccount") ? jsonConfigMap.getBoolean("saveAccount") : false
77
+ );
78
+ jsonConfig.put("authenticatedACH",
79
+ jsonConfigMap.hasKey("authenticatedACH") ? jsonConfigMap.getBoolean("authenticatedACH") : false
80
+ );
81
+ jsonConfig.put("secureAuthentication",
82
+ jsonConfigMap.hasKey("secureAuthentication") && !jsonConfigMap.isNull("secureAuthentication")
83
+ ? jsonConfigMap.getBoolean("secureAuthentication")
84
+ : false
85
+ );
77
86
 
78
- EasyPaymentFactory easyPaymentFactory = EasyPaymentFactory.INSTANCE;
79
- EasyPaymentService easyPaymentService = easyPaymentFactory.create(
80
- currentActivity,
81
- environment,
82
- apiKey,
83
- secretKey
84
- );
85
-
86
- easyPaymentService.makePayment(
87
- jsonConfig,
88
- new EasyPaymentFactory.OnTransactionListener() {
89
- @Override
90
- public void onSuccess(String response) {
91
- WritableMap result = Arguments.createMap();
92
- result.putString("response", response);
93
- promise.resolve(result);
94
- }
87
+ jsonConfig.put("showReceipt",
88
+ jsonConfigMap.hasKey("showReceipt") ? jsonConfigMap.getBoolean("showReceipt") : true
89
+ );
90
+ jsonConfig.put("showDonate",
91
+ jsonConfigMap.hasKey("showDonate") ? jsonConfigMap.getBoolean("showDonate") : false
92
+ );
93
+ jsonConfig.put("showTotal",
94
+ jsonConfigMap.hasKey("showTotal") ? jsonConfigMap.getBoolean("showTotal") : true
95
+ );
96
+ jsonConfig.put("showSubmitButton",
97
+ jsonConfigMap.hasKey("showSubmitButton") ? jsonConfigMap.getBoolean("showSubmitButton") : true
98
+ );
99
+ jsonConfig.put("email",
100
+ jsonConfigMap.hasKey("email") ? jsonConfigMap.getString("email") : ""
101
+ );
102
+ jsonConfig.put("name",
103
+ jsonConfigMap.hasKey("name") ? jsonConfigMap.getString("name") : ""
104
+ );
95
105
 
96
- @Override
97
- public void onError(String error) {
98
- promise.reject("PAYMENT_ERROR", error);
106
+
107
+ JSONArray paymentMethods = new JSONArray();
108
+ ReadableArray methods = jsonConfigMap.getArray("paymentMethod");
109
+ for (int i = 0; i < methods.size(); i++) {
110
+ paymentMethods.put(methods.getString(i));
111
+ }
112
+ jsonConfig.put("paymentMethod", paymentMethods);
113
+
114
+ // Recurring
115
+ if (jsonConfigMap.hasKey("recurring")) {
116
+ ReadableMap recurringMap = jsonConfigMap.getMap("recurring");
117
+ JSONObject recurring = new JSONObject();
118
+ recurring.put("enableRecurring", recurringMap.getBoolean("enableRecurring"));
119
+ if (recurringMap.hasKey("recurringData")) {
120
+ ReadableMap data = recurringMap.getMap("recurringData");
121
+ JSONObject recurringData = new JSONObject();
122
+ recurringData.put("allowCycles", data.getInt("allowCycles"));
123
+ JSONArray intervals = new JSONArray();
124
+ ReadableArray intervalArray = data.getArray("intervals");
125
+ for (int i = 0; i < intervalArray.size(); i++) {
126
+ intervals.put(intervalArray.getString(i));
99
127
  }
128
+ recurringData.put("intervals", intervals);
129
+ recurringData.put("recurringStartType", data.getString("recurringStartType"));
130
+ recurringData.put("recurringStartDate", data.getString("recurringStartDate"));
131
+ recurring.put("recurringData", recurringData);
100
132
  }
101
- );
102
- } catch (NumberFormatException ex) {
103
- promise.reject("VALIDATION_ERROR", "Invalid amount format: " + ex.getMessage());
104
- } catch (Exception ex) {
105
- promise.reject("ERROR", "Payment failed: " + ex.getMessage());
106
- }
133
+ jsonConfig.put("recurring", recurring);
134
+ }
135
+
136
+ // Fields
137
+ if (jsonConfigMap.hasKey("fields")) {
138
+ ReadableMap fieldsMap = jsonConfigMap.getMap("fields");
139
+ JSONObject fields = new JSONObject();
140
+ JSONObject visibility = new JSONObject();
141
+ ReadableMap vis = fieldsMap.getMap("visibility");
142
+ visibility.put("billing", vis.getBoolean("billing"));
143
+ visibility.put("additional", vis.getBoolean("additional"));
144
+ fields.put("visibility", visibility);
145
+
146
+ JSONArray billing = new JSONArray();
147
+ ReadableArray billingArray = fieldsMap.getArray("billing");
148
+ for (int i = 0; i < billingArray.size(); i++) {
149
+ ReadableMap item = billingArray.getMap(i);
150
+ JSONObject obj = new JSONObject();
151
+ obj.put("name", item.getString("name"));
152
+ obj.put("required", item.getBoolean("required"));
153
+ obj.put("value", item.getString("value"));
154
+ billing.put(obj);
155
+ }
156
+ fields.put("billing", billing);
157
+
158
+ JSONArray additional = new JSONArray();
159
+ ReadableArray additionalArray = fieldsMap.getArray("additional");
160
+ for (int i = 0; i < additionalArray.size(); i++) {
161
+ ReadableMap item = additionalArray.getMap(i);
162
+ JSONObject obj = new JSONObject();
163
+ obj.put("name", item.getString("name"));
164
+ obj.put("required", item.getBoolean("required"));
165
+ obj.put("value", item.getString("value"));
166
+ additional.put(obj);
167
+ }
168
+ fields.put("additional", additional);
169
+ jsonConfig.put("fields", fields);
170
+ }
171
+
172
+ // GrailPay Params
173
+ if (jsonConfigMap.hasKey("grailPayParams")) {
174
+ ReadableMap gp = jsonConfigMap.getMap("grailPayParams");
175
+ JSONObject grail = new JSONObject();
176
+ grail.put("role", gp.getString("role"));
177
+ grail.put("timeout", gp.getInt("timeout"));
178
+ grail.put("isSandbox", gp.getBoolean("isSandbox"));
179
+ grail.put("brandingName", gp.getString("brandingName"));
180
+ grail.put("finderSubtitle", gp.getString("finderSubtitle"));
181
+ grail.put("searchPlaceholder", gp.getString("searchPlaceholder"));
182
+ jsonConfig.put("grailPayParams", grail);
183
+ }
184
+
185
+ // Appearance Settings
186
+ if (jsonConfigMap.hasKey("appearanceSettings")) {
187
+ ReadableMap a = jsonConfigMap.getMap("appearanceSettings");
188
+ JSONObject appearance = new JSONObject();
189
+ for (Map.Entry<String, Object> entry : a.toHashMap().entrySet()) {
190
+ appearance.put(entry.getKey(), entry.getValue());
191
+ }
192
+ jsonConfig.put("appearanceSettings", appearance);
193
+ }
194
+
195
+ EasyPaymentFactory factory = EasyPaymentFactory.INSTANCE;
196
+ EasyPaymentService service = factory.create(currentActivity, jsonConfig.getString("environment"), apiKey, secretKey);
197
+
198
+ service.makePayment(jsonConfig, new EasyPaymentFactory.OnTransactionListener() {
199
+ @Override
200
+ public void onSuccess(String response) {
201
+ WritableMap result = Arguments.createMap();
202
+ result.putString("response", response);
203
+ promise.resolve(result);
204
+ }
205
+
206
+ @Override
207
+ public void onError(String error) {
208
+ promise.reject("PAYMENT_ERROR", error);
209
+ }
210
+ });
211
+ } catch (Exception e) {
212
+ promise.reject("ERROR", e.getMessage());
213
+ }
214
+ });
107
215
  }
108
216
 
109
217
  @ReactMethod
@@ -114,26 +222,29 @@ public class RNEasymerchantsdkModule extends ReactContextBaseJavaModule {
114
222
  return;
115
223
  }
116
224
 
117
- try {
118
- EasyPaymentFactory easyPaymentFactory = EasyPaymentFactory.INSTANCE;
119
- easyPaymentFactory.checkPaymentStatus(
120
- currentActivity,
121
- new EasyPaymentFactory.OnPaymentStatusCheckListener() {
122
- @Override
123
- public void onSuccess(JSONObject response) {
124
- WritableMap result = Arguments.createMap();
125
- result.putString("response", response.toString());
126
- promise.resolve(result);
127
- }
225
+ new android.os.Handler(android.os.Looper.getMainLooper()).post(() -> {
226
+ try {
227
+ EasyPaymentFactory.INSTANCE.checkPaymentStatus(currentActivity, new EasyPaymentFactory.OnPaymentStatusCheckListener() {
228
+ @Override
229
+ public void onSuccess(JSONObject response) {
230
+ WritableMap result = Arguments.createMap();
231
+ result.putString("response", response.toString());
232
+ promise.resolve(result);
233
+ }
128
234
 
129
- @Override
130
- public void onFailure(JSONObject error) {
131
- promise.reject("STATUS_CHECK_ERROR", error.toString());
132
- }
235
+ @Override
236
+ public void onFailure(JSONObject error) {
237
+ promise.reject("STATUS_CHECK_ERROR", error.toString());
133
238
  }
134
- );
135
- } catch (Exception ex) {
136
- promise.reject("ERROR", "Failed to check payment status: " + ex.getMessage());
137
- }
239
+ });
240
+ } catch (Exception e) {
241
+ promise.reject("ERROR", "Failed to check payment status: " + e.getMessage());
242
+ }
243
+ });
244
+ }
245
+
246
+ @ReactMethod
247
+ public void paymentReference(String referenceToken, Promise promise) {
248
+ promise.reject("UNSUPPORTED_ERROR", "Payment reference is not supported on Android.");
138
249
  }
139
250
  }
@@ -2,8 +2,8 @@
2
2
  #import <React/RCTLog.h>
3
3
  #import <React/RCTBridgeModule.h>
4
4
 
5
- //#import <easymerchantsdk-Swift.h>
6
- #import <easymerchantsdk/easymerchantsdk-Swift.h>
5
+ #import <easymerchantsdk-Swift.h>
6
+ //#import <easymerchantsdk/easymerchantsdk-Swift.h>
7
7
 
8
8
  @interface EasyMerchantSdk ()
9
9
  @property (nonatomic, strong) EasyMerchantSdkPlugin *sdkPluginInstance;
@@ -633,7 +633,9 @@ class AdditionalInfoVC: BaseVC {
633
633
  "customer" : selectedCard?.customerId ?? "",
634
634
  "customer_id" : selectedCard?.customerId ?? "",
635
635
  "card_id" : selectedCard?.cardId ?? "",
636
- "cvc" : cvvText ?? ""
636
+ "cvc" : cvvText ?? "",
637
+ "name": UserStoreSingleton.shared.merchantName ?? "",
638
+ "email": UserStoreSingleton.shared.verificationEmail ?? ""
637
639
  ]
638
640
 
639
641
  // Conditionally add billing info
@@ -710,6 +712,8 @@ class AdditionalInfoVC: BaseVC {
710
712
  params["interval"] = chosenPlan?.lowercased()
711
713
  }
712
714
 
715
+ print(params)
716
+
713
717
  do {
714
718
  let jsonData = try JSONSerialization.data(withJSONObject: params, options: .prettyPrinted)
715
719
  uRLRequest.httpBody = jsonData
@@ -834,7 +838,7 @@ class AdditionalInfoVC: BaseVC {
834
838
 
835
839
  var params: [String: Any] = [
836
840
  "name": nameOnCard ?? "",
837
- "email": userEmail ?? "",
841
+ "email": UserStoreSingleton.shared.verificationEmail ?? "",
838
842
  "card_number": cardNumber?.replacingOccurrences(of: " ", with: "") ?? "",
839
843
  "cardholder_name": nameOnCard ?? "",
840
844
  "exp_month": expiryDate?.components(separatedBy: "/").first ?? "",
@@ -1214,6 +1218,7 @@ class AdditionalInfoVC: BaseVC {
1214
1218
  "payment_method": "ach",
1215
1219
  "customer": customerID ?? "",
1216
1220
  "currency": "usd",
1221
+ "email": UserStoreSingleton.shared.verificationEmail ?? ""
1217
1222
  ]
1218
1223
 
1219
1224
  // Conditionally add billing info
@@ -1606,7 +1606,9 @@ class BillingInfoVC: BaseVC {
1606
1606
  "customer" : selectedCard?.customerId ?? "",
1607
1607
  "customer_id" : selectedCard?.customerId ?? "",
1608
1608
  "card_id" : selectedCard?.cardId ?? "",
1609
- "cvc" : cvvText ?? ""
1609
+ "cvc" : cvvText ?? "",
1610
+ "name": UserStoreSingleton.shared.merchantName ?? "",
1611
+ "email": UserStoreSingleton.shared.verificationEmail ?? ""
1610
1612
  ]
1611
1613
 
1612
1614
  // Conditionally add billing info
@@ -1668,6 +1670,8 @@ class BillingInfoVC: BaseVC {
1668
1670
  params["interval"] = chosenPlan?.lowercased()
1669
1671
  }
1670
1672
 
1673
+ print(params)
1674
+
1671
1675
  do {
1672
1676
  let jsonData = try JSONSerialization.data(withJSONObject: params, options: .prettyPrinted)
1673
1677
  uRLRequest.httpBody = jsonData
@@ -1777,11 +1781,12 @@ class BillingInfoVC: BaseVC {
1777
1781
  uRLRequest.addValue(token ?? "", forHTTPHeaderField: "Client-Token")
1778
1782
 
1779
1783
  var params: [String: Any] = [
1780
- "name": nameOnCard ?? "",
1784
+ "name": UserStoreSingleton.shared.merchantName ?? "",
1781
1785
  "account_id": accountID ?? "",
1782
1786
  "payment_method": "ach",
1783
1787
  "customer": customerID ?? "",
1784
1788
  "currency": "usd",
1789
+ "email": UserStoreSingleton.shared.verificationEmail ?? ""
1785
1790
  ]
1786
1791
 
1787
1792
  // Conditionally add billing info
@@ -550,7 +550,7 @@ class OTPVerificationVC: BaseVC {
550
550
  "cvc": cvv ?? "",
551
551
  "currency": "usd",
552
552
  // "payment_method": selectedPaymentMethod ?? "",
553
- "save_card": 1,
553
+ "save_card": "1",
554
554
  "is_default": "1",
555
555
  // "create_customer": "1"
556
556
  "email": userEmail ?? ""