@jimrising/easymerchantsdk-react-native 1.3.9 → 1.4.2
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.
- package/.idea/caches/deviceStreaming.xml +77 -0
- package/README.md +140 -81
- package/android/.gradle/8.10/checksums/checksums.lock +0 -0
- package/android/.gradle/8.10/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.10/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/results.bin +1 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$2.dex +0 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/e9a664a11ce12edf79cd87b1e07aa243/results.bin +1 -0
- package/android/build/.transforms/e9a664a11ce12edf79cd87b1e07aa243/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/com/reactlibrary/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$2.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$1.class.uniqueId2 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$2.class.uniqueId0 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule.class.uniqueId3 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkPackage.class.uniqueId1 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build.gradle +4 -1
- package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkModule.java +158 -36
- package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkPackage.java +45 -13
- package/ios/Classes/EasyMerchantSdk.m +106 -55
- package/ios/Classes/EasyMerchantSdk.swift +199 -77
- package/ios/Classes/EasyPayViewController.swift +1 -1
- package/ios/CustomComponents/DatePickerHandler.swift +15 -4
- package/ios/EnvironmentConfig.swift +32 -30
- package/ios/Models/Request.swift +176 -14
- package/ios/Models/Result.swift +12 -5
- package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +855 -366
- package/ios/Pods/ViewControllers/BaseVC.swift +51 -36
- package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +1985 -178
- package/ios/Pods/ViewControllers/CountryListVC.swift +20 -1
- package/ios/Pods/ViewControllers/CustomOverlay.swift +199 -0
- package/ios/Pods/ViewControllers/EmailVerificationVC.swift +74 -5
- package/ios/Pods/ViewControllers/GrailPayVC.swift +131 -107
- package/ios/Pods/ViewControllers/OTPVerificationVC.swift +296 -106
- package/ios/Pods/ViewControllers/PaymentDoneVC.swift +35 -26
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +1276 -545
- package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +607 -24
- package/ios/easymerchantsdk.podspec +1 -1
- package/ios/easymerchantsdk.storyboard +1388 -1165
- package/package.json +1 -1
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
<component name="DeviceStreaming">
|
|
4
4
|
<option name="deviceSelectionList">
|
|
5
5
|
<list>
|
|
6
|
+
<PersistentDeviceSelectionData>
|
|
7
|
+
<option name="api" value="34" />
|
|
8
|
+
<option name="brand" value="Sony" />
|
|
9
|
+
<option name="codename" value="A402SO" />
|
|
10
|
+
<option name="id" value="A402SO" />
|
|
11
|
+
<option name="manufacturer" value="Sony" />
|
|
12
|
+
<option name="name" value="Xperia 10" />
|
|
13
|
+
<option name="screenDensity" value="450" />
|
|
14
|
+
<option name="screenX" value="1080" />
|
|
15
|
+
<option name="screenY" value="2520" />
|
|
16
|
+
</PersistentDeviceSelectionData>
|
|
6
17
|
<PersistentDeviceSelectionData>
|
|
7
18
|
<option name="api" value="27" />
|
|
8
19
|
<option name="brand" value="DOCOMO" />
|
|
@@ -190,6 +201,17 @@
|
|
|
190
201
|
<option name="screenX" value="960" />
|
|
191
202
|
<option name="screenY" value="2142" />
|
|
192
203
|
</PersistentDeviceSelectionData>
|
|
204
|
+
<PersistentDeviceSelectionData>
|
|
205
|
+
<option name="api" value="35" />
|
|
206
|
+
<option name="brand" value="google" />
|
|
207
|
+
<option name="codename" value="caiman" />
|
|
208
|
+
<option name="id" value="caiman" />
|
|
209
|
+
<option name="manufacturer" value="Google" />
|
|
210
|
+
<option name="name" value="Pixel 9 Pro" />
|
|
211
|
+
<option name="screenDensity" value="360" />
|
|
212
|
+
<option name="screenX" value="960" />
|
|
213
|
+
<option name="screenY" value="2142" />
|
|
214
|
+
</PersistentDeviceSelectionData>
|
|
193
215
|
<PersistentDeviceSelectionData>
|
|
194
216
|
<option name="api" value="34" />
|
|
195
217
|
<option name="brand" value="google" />
|
|
@@ -245,6 +267,17 @@
|
|
|
245
267
|
<option name="screenX" value="1440" />
|
|
246
268
|
<option name="screenY" value="3088" />
|
|
247
269
|
</PersistentDeviceSelectionData>
|
|
270
|
+
<PersistentDeviceSelectionData>
|
|
271
|
+
<option name="api" value="34" />
|
|
272
|
+
<option name="brand" value="motorola" />
|
|
273
|
+
<option name="codename" value="dubai" />
|
|
274
|
+
<option name="id" value="dubai" />
|
|
275
|
+
<option name="manufacturer" value="Motorola" />
|
|
276
|
+
<option name="name" value="edge 30" />
|
|
277
|
+
<option name="screenDensity" value="405" />
|
|
278
|
+
<option name="screenX" value="1080" />
|
|
279
|
+
<option name="screenY" value="2400" />
|
|
280
|
+
</PersistentDeviceSelectionData>
|
|
248
281
|
<PersistentDeviceSelectionData>
|
|
249
282
|
<option name="api" value="34" />
|
|
250
283
|
<option name="brand" value="samsung" />
|
|
@@ -322,6 +355,17 @@
|
|
|
322
355
|
<option name="screenX" value="720" />
|
|
323
356
|
<option name="screenY" value="1600" />
|
|
324
357
|
</PersistentDeviceSelectionData>
|
|
358
|
+
<PersistentDeviceSelectionData>
|
|
359
|
+
<option name="api" value="34" />
|
|
360
|
+
<option name="brand" value="motorola" />
|
|
361
|
+
<option name="codename" value="fogos" />
|
|
362
|
+
<option name="id" value="fogos" />
|
|
363
|
+
<option name="manufacturer" value="Motorola" />
|
|
364
|
+
<option name="name" value="moto g34 5G" />
|
|
365
|
+
<option name="screenDensity" value="280" />
|
|
366
|
+
<option name="screenX" value="720" />
|
|
367
|
+
<option name="screenY" value="1600" />
|
|
368
|
+
</PersistentDeviceSelectionData>
|
|
325
369
|
<PersistentDeviceSelectionData>
|
|
326
370
|
<option name="api" value="34" />
|
|
327
371
|
<option name="brand" value="samsung" />
|
|
@@ -344,6 +388,17 @@
|
|
|
344
388
|
<option name="screenX" value="1200" />
|
|
345
389
|
<option name="screenY" value="1920" />
|
|
346
390
|
</PersistentDeviceSelectionData>
|
|
391
|
+
<PersistentDeviceSelectionData>
|
|
392
|
+
<option name="api" value="33" />
|
|
393
|
+
<option name="brand" value="samsung" />
|
|
394
|
+
<option name="codename" value="gts7lwifi" />
|
|
395
|
+
<option name="id" value="gts7lwifi" />
|
|
396
|
+
<option name="manufacturer" value="Samsung" />
|
|
397
|
+
<option name="name" value="SM-T870" />
|
|
398
|
+
<option name="screenDensity" value="340" />
|
|
399
|
+
<option name="screenX" value="1600" />
|
|
400
|
+
<option name="screenY" value="2560" />
|
|
401
|
+
</PersistentDeviceSelectionData>
|
|
347
402
|
<PersistentDeviceSelectionData>
|
|
348
403
|
<option name="api" value="34" />
|
|
349
404
|
<option name="brand" value="samsung" />
|
|
@@ -454,6 +509,17 @@
|
|
|
454
509
|
<option name="screenX" value="1080" />
|
|
455
510
|
<option name="screenY" value="2400" />
|
|
456
511
|
</PersistentDeviceSelectionData>
|
|
512
|
+
<PersistentDeviceSelectionData>
|
|
513
|
+
<option name="api" value="34" />
|
|
514
|
+
<option name="brand" value="motorola" />
|
|
515
|
+
<option name="codename" value="manaus" />
|
|
516
|
+
<option name="id" value="manaus" />
|
|
517
|
+
<option name="manufacturer" value="Motorola" />
|
|
518
|
+
<option name="name" value="edge 40 neo" />
|
|
519
|
+
<option name="screenDensity" value="400" />
|
|
520
|
+
<option name="screenX" value="1080" />
|
|
521
|
+
<option name="screenY" value="2400" />
|
|
522
|
+
</PersistentDeviceSelectionData>
|
|
457
523
|
<PersistentDeviceSelectionData>
|
|
458
524
|
<option name="api" value="33" />
|
|
459
525
|
<option name="brand" value="motorola" />
|
|
@@ -487,6 +553,17 @@
|
|
|
487
553
|
<option name="screenX" value="1080" />
|
|
488
554
|
<option name="screenY" value="2400" />
|
|
489
555
|
</PersistentDeviceSelectionData>
|
|
556
|
+
<PersistentDeviceSelectionData>
|
|
557
|
+
<option name="api" value="35" />
|
|
558
|
+
<option name="brand" value="samsung" />
|
|
559
|
+
<option name="codename" value="pa3q" />
|
|
560
|
+
<option name="id" value="pa3q" />
|
|
561
|
+
<option name="manufacturer" value="Samsung" />
|
|
562
|
+
<option name="name" value="Galaxy S25 Ultra" />
|
|
563
|
+
<option name="screenDensity" value="600" />
|
|
564
|
+
<option name="screenX" value="1440" />
|
|
565
|
+
<option name="screenY" value="3120" />
|
|
566
|
+
</PersistentDeviceSelectionData>
|
|
490
567
|
<PersistentDeviceSelectionData>
|
|
491
568
|
<option name="api" value="33" />
|
|
492
569
|
<option name="brand" value="google" />
|
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.
|
|
10
|
+
"@jimrising/easymerchantsdk-react-native": "^1.4.2"
|
|
11
11
|
},
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -120,6 +120,7 @@ import {
|
|
|
120
120
|
StyleSheet,
|
|
121
121
|
Platform,
|
|
122
122
|
NativeModules,
|
|
123
|
+
ScrollView,
|
|
123
124
|
} from 'react-native';
|
|
124
125
|
|
|
125
126
|
const { RNEasymerchantsdk, EasyMerchantSdk } = NativeModules;
|
|
@@ -127,21 +128,22 @@ const { RNEasymerchantsdk, EasyMerchantSdk } = NativeModules;
|
|
|
127
128
|
const App = () => {
|
|
128
129
|
const [version, setVersion] = useState('');
|
|
129
130
|
const [response, setResponse] = useState('');
|
|
131
|
+
const [referenceToken, setReferenceToken] = useState('');
|
|
130
132
|
|
|
131
133
|
useEffect(() => {
|
|
132
134
|
const setup = async () => {
|
|
133
135
|
try {
|
|
134
136
|
if (Platform.OS === 'ios') {
|
|
135
137
|
await EasyMerchantSdk.setViewController();
|
|
136
|
-
EasyMerchantSdk.configureEnvironment(
|
|
137
|
-
'staging',
|
|
138
|
-
'
|
|
139
|
-
'
|
|
138
|
+
await EasyMerchantSdk.configureEnvironment(
|
|
139
|
+
'staging',
|
|
140
|
+
'mobilesdk1980IUuCzwWl',
|
|
141
|
+
'mobilesdk1980LVHnN0Oh'
|
|
140
142
|
);
|
|
141
143
|
}
|
|
142
144
|
} catch (err) {
|
|
143
145
|
console.error('Initialization Error:', err);
|
|
144
|
-
setResponse(`❌ Initialization Error: ${err.message || err}`);
|
|
146
|
+
setResponse(`❌ Initialization Error: ${err.message || JSON.stringify(err)}`);
|
|
145
147
|
}
|
|
146
148
|
};
|
|
147
149
|
|
|
@@ -156,98 +158,154 @@ const App = () => {
|
|
|
156
158
|
: await EasyMerchantSdk.getPlatformVersion();
|
|
157
159
|
setVersion(ver);
|
|
158
160
|
} catch (err) {
|
|
159
|
-
setVersion('Error
|
|
160
|
-
console.error(err);
|
|
161
|
+
setVersion('Error: Could not fetch version');
|
|
162
|
+
console.error('Platform version error:', err);
|
|
161
163
|
}
|
|
162
164
|
};
|
|
163
165
|
|
|
164
166
|
const handleBilling = async () => {
|
|
165
|
-
const amount = '72';
|
|
166
167
|
const billingInfo = {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
visibility: { billing: true, additional: true },
|
|
169
|
+
billing: {
|
|
170
|
+
address: 'Mohali, Punjab',
|
|
171
|
+
country: 'India',
|
|
172
|
+
state: 'Punjab',
|
|
173
|
+
city: 'Anandpur Sahib',
|
|
174
|
+
postal_code: '140118',
|
|
175
|
+
},
|
|
176
|
+
billingRequired: {
|
|
177
|
+
address: true,
|
|
178
|
+
country: true,
|
|
179
|
+
state: true,
|
|
180
|
+
city: false,
|
|
181
|
+
postal_code: true,
|
|
182
|
+
},
|
|
183
|
+
additional: {
|
|
173
184
|
name: 'Test User',
|
|
174
|
-
|
|
175
|
-
phone_number: '
|
|
176
|
-
|
|
177
|
-
|
|
185
|
+
email_address: 'test@gmail.com',
|
|
186
|
+
phone_number: '9465351125',
|
|
187
|
+
description: 'Test',
|
|
188
|
+
},
|
|
189
|
+
additionalRequired: {
|
|
190
|
+
name: true,
|
|
191
|
+
email_address: true,
|
|
192
|
+
phone_number: true,
|
|
193
|
+
description: false,
|
|
178
194
|
},
|
|
179
195
|
};
|
|
180
196
|
|
|
181
197
|
const themeConfiguration = {
|
|
182
|
-
bodyBackgroundColor: '#
|
|
183
|
-
containerBackgroundColor: '#
|
|
184
|
-
primaryFontColor: '#
|
|
185
|
-
secondaryFontColor: '#
|
|
186
|
-
primaryButtonBackgroundColor: '#
|
|
187
|
-
primaryButtonHoverColor: '#
|
|
198
|
+
bodyBackgroundColor: '#121212',
|
|
199
|
+
containerBackgroundColor: '#1E1E1E',
|
|
200
|
+
primaryFontColor: '#FFFFFF',
|
|
201
|
+
secondaryFontColor: '#B0B0B0',
|
|
202
|
+
primaryButtonBackgroundColor: '#2563EB',
|
|
203
|
+
primaryButtonHoverColor: '#1D4ED8',
|
|
188
204
|
primaryButtonFontColor: '#FFFFFF',
|
|
189
|
-
secondaryButtonBackgroundColor: '#
|
|
190
|
-
secondaryButtonHoverColor: '#
|
|
191
|
-
secondaryButtonFontColor: '#
|
|
192
|
-
borderRadius: '
|
|
193
|
-
fontSize: '
|
|
205
|
+
secondaryButtonBackgroundColor: '#374151',
|
|
206
|
+
secondaryButtonHoverColor: '#4B5563',
|
|
207
|
+
secondaryButtonFontColor: '#E5E7EB',
|
|
208
|
+
borderRadius: '8',
|
|
209
|
+
fontSize: '14',
|
|
210
|
+
fontWeight: 500,
|
|
211
|
+
fontFamily: '"Inter", sans-serif',
|
|
194
212
|
};
|
|
195
213
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
214
|
+
try {
|
|
215
|
+
if (Platform.OS === 'android') {
|
|
216
|
+
const result = await RNEasymerchantsdk.billing('72', null);
|
|
217
|
+
setResponse(`✅ Android Payment Success: ${result}`);
|
|
218
|
+
} else {
|
|
219
|
+
const result = await EasyMerchantSdk.billing(
|
|
220
|
+
'99',
|
|
221
|
+
'usd',
|
|
222
|
+
billingInfo,
|
|
223
|
+
['card', 'bank'],
|
|
224
|
+
themeConfiguration,
|
|
225
|
+
false, // tokenOnly
|
|
226
|
+
true, // saveCard
|
|
227
|
+
true, // saveAccount
|
|
228
|
+
false, // authenticatedACH
|
|
229
|
+
null, // grailPayParams
|
|
230
|
+
'Submit',
|
|
231
|
+
false, // isRecurring
|
|
232
|
+
['weekly', 'monthly'],
|
|
233
|
+
'custom',
|
|
234
|
+
'07/07/2025',
|
|
235
|
+
true, // secureAuthentication
|
|
236
|
+
true, // showReceipt
|
|
237
|
+
true, // showTotal
|
|
238
|
+
true // showSubmitButton
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
console.log('Billing success (full response):', JSON.stringify(result, null, 2));
|
|
242
|
+
|
|
243
|
+
try {
|
|
244
|
+
const refToken = result?.additionalInfo?.threeDSecureStatus?.data?.ref_token;
|
|
245
|
+
if (refToken) {
|
|
246
|
+
setReferenceToken(refToken);
|
|
247
|
+
setResponse(`✅ Ref Token: ${refToken}\nFull Response:\n${JSON.stringify(result, null, 2)}`);
|
|
248
|
+
} else {
|
|
249
|
+
setResponse(`✅ iOS Payment Success (no ref_token):\n${JSON.stringify(result, null, 2)}`);
|
|
250
|
+
}
|
|
251
|
+
} catch (err) {
|
|
252
|
+
console.error('Error parsing ref_token:', err);
|
|
253
|
+
setResponse(`✅ iOS Payment Success (error parsing ref_token):\n${JSON.stringify(result, null, 2)}`);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
} catch (error) {
|
|
257
|
+
console.error('Billing Error:', error);
|
|
258
|
+
let errorMessage = 'Unknown error';
|
|
259
|
+
if (error.code && error.message) {
|
|
260
|
+
errorMessage = `Code: ${error.code}, Message: ${error.message}`;
|
|
261
|
+
} else if (error.message) {
|
|
262
|
+
errorMessage = error.message;
|
|
263
|
+
}
|
|
264
|
+
setResponse(`❌ Billing Error: ${errorMessage}`);
|
|
265
|
+
}
|
|
266
|
+
};
|
|
206
267
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const result = await EasyMerchantSdk.billing(
|
|
213
|
-
amount,
|
|
214
|
-
JSON.stringify(billingInfo),
|
|
215
|
-
['card', 'bank', 'crypto'],
|
|
216
|
-
themeConfiguration,
|
|
217
|
-
false, // tokenOnly
|
|
218
|
-
false, // saveCard
|
|
219
|
-
false, // saveAccount
|
|
220
|
-
true, // authenticatedACH if it is true only then pass authConfig params
|
|
221
|
-
authConfig,
|
|
222
|
-
"Submit",
|
|
223
|
-
true, // is_recurring == true ? must need to send below 4 params
|
|
224
|
-
['weekly', 'monthly'], // recurringIntervals
|
|
225
|
-
'custom', // recurringStartDateType
|
|
226
|
-
"05/30/2025", /// Format MM/dd/yyyy, must be today or future date
|
|
227
|
-
true // enable3DS :- must send it true for 3DS card payment.
|
|
228
|
-
);
|
|
229
|
-
|
|
230
|
-
console.log("Billing success:", result);
|
|
231
|
-
setResponse(`✅ iOS Payment Success: ${JSON.stringify(result)}`);
|
|
232
|
-
}
|
|
233
|
-
} catch (error) {
|
|
234
|
-
console.error('Billing Error:', error);
|
|
235
|
-
setResponse(`❌ Billing Error: ${error.message || JSON.stringify(error)}`);
|
|
236
|
-
}
|
|
268
|
+
const handlePaymentReference = async () => {
|
|
269
|
+
if (!referenceToken) {
|
|
270
|
+
setResponse('❌ No reference token available from billing');
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
237
273
|
|
|
274
|
+
try {
|
|
275
|
+
if (Platform.OS === 'android') {
|
|
276
|
+
setResponse('❌ Payment Reference not supported on Android');
|
|
277
|
+
} else {
|
|
278
|
+
const result = await EasyMerchantSdk.paymentReference(referenceToken);
|
|
279
|
+
console.log('Payment Reference success:', JSON.stringify(result, null, 2));
|
|
280
|
+
setResponse(`✅ iOS Payment Reference Success:\n${JSON.stringify(result, null, 2)}`);
|
|
281
|
+
}
|
|
282
|
+
} catch (error) {
|
|
283
|
+
console.error('Payment Reference Error:', error);
|
|
284
|
+
let errorMessage = 'Unknown error';
|
|
285
|
+
if (error.code && error.message) {
|
|
286
|
+
errorMessage = `Code: ${error.code}, Message: ${error.message}`;
|
|
287
|
+
} else if (error.message) {
|
|
288
|
+
errorMessage = error.message;
|
|
289
|
+
}
|
|
290
|
+
setResponse(`❌ Payment Reference Error: ${errorMessage}`);
|
|
291
|
+
}
|
|
238
292
|
};
|
|
239
293
|
|
|
240
294
|
return (
|
|
241
295
|
<View style={styles.container}>
|
|
242
|
-
<
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
296
|
+
<ScrollView contentContainerStyle={styles.scrollContent}>
|
|
297
|
+
<Text style={styles.title}>EasyMerchant SDK</Text>
|
|
298
|
+
<Text style={styles.version}>Platform Version: {version}</Text>
|
|
299
|
+
|
|
300
|
+
<Button title="Get Platform Version" onPress={getPlatformVersion} />
|
|
301
|
+
<View style={styles.space} />
|
|
302
|
+
<Button title="Start Billing" onPress={handleBilling} />
|
|
303
|
+
<View style={styles.space} />
|
|
304
|
+
<Button title="Start Payment Reference" onPress={handlePaymentReference} />
|
|
305
|
+
<View style={styles.space} />
|
|
306
|
+
|
|
307
|
+
<Text style={styles.response}>{response}</Text>
|
|
308
|
+
</ScrollView>
|
|
251
309
|
</View>
|
|
252
310
|
);
|
|
253
311
|
};
|
|
@@ -258,6 +316,9 @@ const styles = StyleSheet.create({
|
|
|
258
316
|
container: {
|
|
259
317
|
flex: 1,
|
|
260
318
|
backgroundColor: '#F9FAFB',
|
|
319
|
+
},
|
|
320
|
+
scrollContent: {
|
|
321
|
+
flexGrow: 1,
|
|
261
322
|
alignItems: 'center',
|
|
262
323
|
justifyContent: 'center',
|
|
263
324
|
padding: 24,
|
|
@@ -284,8 +345,6 @@ const styles = StyleSheet.create({
|
|
|
284
345
|
});
|
|
285
346
|
|
|
286
347
|
|
|
287
|
-
|
|
288
|
-
|
|
289
348
|
```
|
|
290
349
|
|
|
291
350
|
You can send `null` if billing info not available.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Tue Jun 03 14:11:22 IST 2025
|
|
2
2
|
gradle.version=8.9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
o/bundleLibRuntimeToDirDebug
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
o/classes
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automatically generated file. DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
package com.reactlibrary;
|
|
5
|
+
|
|
6
|
+
public final class BuildConfig {
|
|
7
|
+
public static final boolean DEBUG = Boolean.parseBoolean("true");
|
|
8
|
+
public static final String LIBRARY_PACKAGE_NAME = "com.reactlibrary";
|
|
9
|
+
public static final String BUILD_TYPE = "debug";
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"artifactType": {
|
|
4
|
+
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
|
|
5
|
+
"kind": "Directory"
|
|
6
|
+
},
|
|
7
|
+
"applicationId": "com.reactlibrary",
|
|
8
|
+
"variantName": "debug",
|
|
9
|
+
"elements": [
|
|
10
|
+
{
|
|
11
|
+
"type": "SINGLE",
|
|
12
|
+
"filters": [],
|
|
13
|
+
"attributes": [],
|
|
14
|
+
"outputFile": "AndroidManifest.xml"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"elementType": "File"
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#Wed Jun 11 11:27:07 IST 2025
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/build/generated/res/resValues/debug"/></dataSet><mergedItems/></merger>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/debug/jniLibs"/></dataSet></merger>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/debug/shaders"/></dataSet></merger>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Documents/GitHub/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/build/intermediates/shader_assets/debug/compileDebugShaders/out"/></dataSet></merger>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0 Warning/Error
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
com.reactlibrary
|