@jimrising/easymerchantsdk-react-native 1.0.0
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 +340 -0
- package/.idea/em-MobileCheckoutSDK-ReactNative.iml +9 -0
- package/.idea/misc.xml +5 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/README.md +230 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/results.bin +1 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/41cd2635778c1bb5c18af2c46eb9196e/results.bin +1 -0
- package/android/build/.transforms/41cd2635778c1bb5c18af2c46eb9196e/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/results.bin +1 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/7eb7ceaa43c9e8323ac65b4f785987b6/results.bin +1 -0
- package/android/build/.transforms/7eb7ceaa43c9e8323ac65b4f785987b6/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/results.bin +1 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/f1a160720415bc76d8d6c6734c5acf3e/results.bin +1 -0
- package/android/build/.transforms/f1a160720415bc76d8d6c6734c5acf3e/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.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.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.class.uniqueId1 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkPackage.class.uniqueId0 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build.gradle +55 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkModule.java +72 -0
- package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkPackage.java +28 -0
- package/index.js +5 -0
- package/ios/Bundle/EasyPayBundle.swift +22 -0
- package/ios/Classes/EasyMerchantSdk.h +4 -0
- package/ios/Classes/EasyMerchantSdk.m +43 -0
- package/ios/Classes/EasyMerchantSdk.swift +124 -0
- package/ios/Classes/EasyPayViewController.swift +90 -0
- package/ios/CustomComponents/CheckboxButton.swift +20 -0
- package/ios/CustomComponents/FilledButton.swift +17 -0
- package/ios/CustomComponents/OutlineButton.swift +26 -0
- package/ios/CustomComponents/TextFieldStackView.swift +96 -0
- package/ios/EnvironmentConfig.swift +63 -0
- package/ios/Example/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- package/ios/Example/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
- package/ios/Example/Assets.xcassets/Contents.json +6 -0
- package/ios/Example/Base.lproj/LaunchScreen.storyboard +25 -0
- package/ios/Example/Base.lproj/Main.storyboard +65 -0
- package/ios/Example/SceneDelegate.swift +52 -0
- package/ios/Example/ViewController.swift +84 -0
- package/ios/Extensions/UIColor.swift +22 -0
- package/ios/Extensions/UIFont.swift +80 -0
- package/ios/Extensions/UIViewController+Extension.swift +42 -0
- package/ios/Models/AdditionalInfo.swift +16 -0
- package/ios/Models/BankAccountModel.swift +23 -0
- package/ios/Models/BillingInfo.swift +16 -0
- package/ios/Models/CardModel.swift +19 -0
- package/ios/Models/Country.swift +19 -0
- package/ios/Models/PaymentInfo.swift +46 -0
- package/ios/Models/Request.swift +245 -0
- package/ios/Models/Result.swift +69 -0
- package/ios/Pods/UserDefaults/UserStoreSingleton.swift +200 -0
- package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +1073 -0
- package/ios/Pods/ViewControllers/BaseVC.swift +117 -0
- package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +616 -0
- package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CityListTVC.swift +19 -0
- package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CountryListTVC.swift +19 -0
- package/ios/Pods/ViewControllers/BillingInfoVC/Cells/StateListTVC.swift +19 -0
- package/ios/Pods/ViewControllers/CountryListVC.swift +367 -0
- package/ios/Pods/ViewControllers/EmailVerificationVC.swift +192 -0
- package/ios/Pods/ViewControllers/OTPVerificationVC.swift +1009 -0
- package/ios/Pods/ViewControllers/PaymentDoneVC.swift +94 -0
- package/ios/Pods/ViewControllers/PaymentErrorVC.swift +43 -0
- package/ios/Pods/ViewControllers/PaymentInformation/AccountTypeTVC.swift +19 -0
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +4269 -0
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInformationCVC.swift +20 -0
- package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.swift +37 -0
- package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.xib +163 -0
- package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.swift +40 -0
- package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.xib +184 -0
- package/ios/Pods/ViewControllers/TermAndConditionsVC.swift +21 -0
- package/ios/Resources/Assets.xcassets/Card/Amex.imageset/206682_american_express_method_card_payment_icon.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/Amex.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/Contents.json +6 -0
- package/ios/Resources/Assets.xcassets/Card/DinersClub.imageset/472318_card_club_diners_dinner_payment_icon.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/DinersClub.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/Discover.imageset/206686_network_payment_discover_card_method_icon.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/Discover.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/JCB.imageset/358102_card_jcb_payment_icon.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/JCB.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/MasterCard.imageset/206680_master_method_card_payment_icon.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/MasterCard.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/UnionPay.imageset/1468976_card_payment_unionpay_icon.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/UnionPay.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/Visa.imageset/206684_visa_method_card_payment_icon.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/Visa.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/maestro.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/maestro.imageset/maestro.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/paypal.imageset/206675_paypal_method_payment_icon.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/paypal.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/rupay.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/rupay.imageset/rupay.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/unknown_card.imageset/4635000_card_credit_digital_money_icon.svg +1 -0
- package/ios/Resources/Assets.xcassets/Card/unknown_card.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/worldpay.imageset/Contents.json +12 -0
- package/ios/Resources/Assets.xcassets/Card/worldpay.imageset/worldpay.svg +1 -0
- package/ios/Resources/Assets.xcassets/Contents.json +6 -0
- package/ios/Resources/Assets.xcassets/Ellipsis.imageset/Contents.json +23 -0
- package/ios/Resources/Assets.xcassets/Ellipsis.imageset/icons8-menu-30.png +0 -0
- package/ios/Resources/Assets.xcassets/Ellipsis.imageset/icons8-menu-60.png +0 -0
- package/ios/Resources/Assets.xcassets/Ellipsis.imageset/icons8-menu-90.png +0 -0
- package/ios/Resources/Assets.xcassets/Rotate.imageset/Contents.json +23 -0
- package/ios/Resources/Assets.xcassets/Rotate.imageset/refresh-cw-2.png +0 -0
- package/ios/Resources/Assets.xcassets/Rotate.imageset/refresh-cw-3.png +0 -0
- package/ios/Resources/Assets.xcassets/Rotate.imageset/refresh-cw.png +0 -0
- package/ios/Resources/Assets.xcassets/amexCvc.imageset/Contents.json +22 -0
- package/ios/Resources/Assets.xcassets/amexCvc.imageset/Group-1.png +0 -0
- package/ios/Resources/Assets.xcassets/amexCvc.imageset/Group.png +0 -0
- package/ios/Resources/Assets.xcassets/check.imageset/Contents.json +23 -0
- package/ios/Resources/Assets.xcassets/check.imageset/check-circle-4.png +0 -0
- package/ios/Resources/Assets.xcassets/check.imageset/check-circle-5.png +0 -0
- package/ios/Resources/Assets.xcassets/check.imageset/check-circle-6.png +0 -0
- package/ios/Resources/Assets.xcassets/chip.imageset/Contents.json +21 -0
- package/ios/Resources/Assets.xcassets/chip.imageset/chip.png +0 -0
- package/ios/Resources/Assets.xcassets/loaderImage.imageset/Contents.json +23 -0
- package/ios/Resources/Assets.xcassets/loaderImage.imageset/check-circle-2.png +0 -0
- package/ios/Resources/Assets.xcassets/loaderImage.imageset/check-circle-3.png +0 -0
- package/ios/Resources/Assets.xcassets/loaderImage.imageset/check-circle.png +0 -0
- package/ios/Resources/Assets.xcassets/payment_done_icon.imageset/Contents.json +23 -0
- package/ios/Resources/Assets.xcassets/payment_done_icon.imageset/payment_done_icon 1.png +0 -0
- package/ios/Resources/Assets.xcassets/payment_done_icon.imageset/payment_done_icon 2.png +0 -0
- package/ios/Resources/Assets.xcassets/payment_done_icon.imageset/payment_done_icon.png +0 -0
- package/ios/Resources/Assets.xcassets/payment_error_icon.imageset/Contents.json +23 -0
- package/ios/Resources/Assets.xcassets/payment_error_icon.imageset/payment_error_icon 1.png +0 -0
- package/ios/Resources/Assets.xcassets/payment_error_icon.imageset/payment_error_icon 2.png +0 -0
- package/ios/Resources/Assets.xcassets/payment_error_icon.imageset/payment_error_icon.png +0 -0
- package/ios/Resources/Assets.xcassets/wallet.imageset/Contents.json +23 -0
- package/ios/Resources/Assets.xcassets/wallet.imageset/icons8-wallet-24(@1/303/227).png +0 -0
- package/ios/Resources/Assets.xcassets/wallet.imageset/icons8-wallet-48(@2/303/227).png +0 -0
- package/ios/Resources/Assets.xcassets/wallet.imageset/icons8-wallet-72(@3/303/227).png +0 -0
- package/ios/Resources/Colors.xcassets/00000008.colorset/Contents.json +20 -0
- package/ios/Resources/Colors.xcassets/00000016.colorset/Contents.json +20 -0
- package/ios/Resources/Colors.xcassets/00000038.colorset/Contents.json +20 -0
- package/ios/Resources/Colors.xcassets/00000060.colorset/Contents.json +20 -0
- package/ios/Resources/Colors.xcassets/1757D9.colorset/Contents.json +20 -0
- package/ios/Resources/Colors.xcassets/Contents.json +6 -0
- package/ios/Resources/Colors.xcassets/E93939.colorset/Contents.json +20 -0
- package/ios/Resources/PrivacyInfo.xcprivacy +10 -0
- package/ios/ThirdParty/Keyboad Handling/KeyboardObserver.swift +74 -0
- package/ios/easymerchantsdk.podspec +80 -0
- package/ios/easymerchantsdk.storyboard +5885 -0
- package/package.json +27 -0
- package/src/index.js +44 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="DeviceStreaming">
|
|
4
|
+
<option name="deviceSelectionList">
|
|
5
|
+
<list>
|
|
6
|
+
<PersistentDeviceSelectionData>
|
|
7
|
+
<option name="api" value="27" />
|
|
8
|
+
<option name="brand" value="DOCOMO" />
|
|
9
|
+
<option name="codename" value="F01L" />
|
|
10
|
+
<option name="id" value="F01L" />
|
|
11
|
+
<option name="manufacturer" value="FUJITSU" />
|
|
12
|
+
<option name="name" value="F-01L" />
|
|
13
|
+
<option name="screenDensity" value="360" />
|
|
14
|
+
<option name="screenX" value="720" />
|
|
15
|
+
<option name="screenY" value="1280" />
|
|
16
|
+
</PersistentDeviceSelectionData>
|
|
17
|
+
<PersistentDeviceSelectionData>
|
|
18
|
+
<option name="api" value="34" />
|
|
19
|
+
<option name="brand" value="OPPO" />
|
|
20
|
+
<option name="codename" value="OP573DL1" />
|
|
21
|
+
<option name="id" value="OP573DL1" />
|
|
22
|
+
<option name="manufacturer" value="OPPO" />
|
|
23
|
+
<option name="name" value="CPH2557" />
|
|
24
|
+
<option name="screenDensity" value="480" />
|
|
25
|
+
<option name="screenX" value="1080" />
|
|
26
|
+
<option name="screenY" value="2400" />
|
|
27
|
+
</PersistentDeviceSelectionData>
|
|
28
|
+
<PersistentDeviceSelectionData>
|
|
29
|
+
<option name="api" value="28" />
|
|
30
|
+
<option name="brand" value="DOCOMO" />
|
|
31
|
+
<option name="codename" value="SH-01L" />
|
|
32
|
+
<option name="id" value="SH-01L" />
|
|
33
|
+
<option name="manufacturer" value="SHARP" />
|
|
34
|
+
<option name="name" value="AQUOS sense2 SH-01L" />
|
|
35
|
+
<option name="screenDensity" value="480" />
|
|
36
|
+
<option name="screenX" value="1080" />
|
|
37
|
+
<option name="screenY" value="2160" />
|
|
38
|
+
</PersistentDeviceSelectionData>
|
|
39
|
+
<PersistentDeviceSelectionData>
|
|
40
|
+
<option name="api" value="34" />
|
|
41
|
+
<option name="brand" value="Lenovo" />
|
|
42
|
+
<option name="codename" value="TB370FU" />
|
|
43
|
+
<option name="id" value="TB370FU" />
|
|
44
|
+
<option name="manufacturer" value="Lenovo" />
|
|
45
|
+
<option name="name" value="Tab P12" />
|
|
46
|
+
<option name="screenDensity" value="340" />
|
|
47
|
+
<option name="screenX" value="1840" />
|
|
48
|
+
<option name="screenY" value="2944" />
|
|
49
|
+
</PersistentDeviceSelectionData>
|
|
50
|
+
<PersistentDeviceSelectionData>
|
|
51
|
+
<option name="api" value="31" />
|
|
52
|
+
<option name="brand" value="samsung" />
|
|
53
|
+
<option name="codename" value="a51" />
|
|
54
|
+
<option name="id" value="a51" />
|
|
55
|
+
<option name="manufacturer" value="Samsung" />
|
|
56
|
+
<option name="name" value="Galaxy A51" />
|
|
57
|
+
<option name="screenDensity" value="420" />
|
|
58
|
+
<option name="screenX" value="1080" />
|
|
59
|
+
<option name="screenY" value="2400" />
|
|
60
|
+
</PersistentDeviceSelectionData>
|
|
61
|
+
<PersistentDeviceSelectionData>
|
|
62
|
+
<option name="api" value="34" />
|
|
63
|
+
<option name="brand" value="google" />
|
|
64
|
+
<option name="codename" value="akita" />
|
|
65
|
+
<option name="id" value="akita" />
|
|
66
|
+
<option name="manufacturer" value="Google" />
|
|
67
|
+
<option name="name" value="Pixel 8a" />
|
|
68
|
+
<option name="screenDensity" value="420" />
|
|
69
|
+
<option name="screenX" value="1080" />
|
|
70
|
+
<option name="screenY" value="2400" />
|
|
71
|
+
</PersistentDeviceSelectionData>
|
|
72
|
+
<PersistentDeviceSelectionData>
|
|
73
|
+
<option name="api" value="33" />
|
|
74
|
+
<option name="brand" value="samsung" />
|
|
75
|
+
<option name="codename" value="b0q" />
|
|
76
|
+
<option name="id" value="b0q" />
|
|
77
|
+
<option name="manufacturer" value="Samsung" />
|
|
78
|
+
<option name="name" value="Galaxy S22 Ultra" />
|
|
79
|
+
<option name="screenDensity" value="600" />
|
|
80
|
+
<option name="screenX" value="1440" />
|
|
81
|
+
<option name="screenY" value="3088" />
|
|
82
|
+
</PersistentDeviceSelectionData>
|
|
83
|
+
<PersistentDeviceSelectionData>
|
|
84
|
+
<option name="api" value="32" />
|
|
85
|
+
<option name="brand" value="google" />
|
|
86
|
+
<option name="codename" value="bluejay" />
|
|
87
|
+
<option name="id" value="bluejay" />
|
|
88
|
+
<option name="manufacturer" value="Google" />
|
|
89
|
+
<option name="name" value="Pixel 6a" />
|
|
90
|
+
<option name="screenDensity" value="420" />
|
|
91
|
+
<option name="screenX" value="1080" />
|
|
92
|
+
<option name="screenY" value="2400" />
|
|
93
|
+
</PersistentDeviceSelectionData>
|
|
94
|
+
<PersistentDeviceSelectionData>
|
|
95
|
+
<option name="api" value="34" />
|
|
96
|
+
<option name="brand" value="google" />
|
|
97
|
+
<option name="codename" value="caiman" />
|
|
98
|
+
<option name="id" value="caiman" />
|
|
99
|
+
<option name="manufacturer" value="Google" />
|
|
100
|
+
<option name="name" value="Pixel 9 Pro" />
|
|
101
|
+
<option name="screenDensity" value="360" />
|
|
102
|
+
<option name="screenX" value="960" />
|
|
103
|
+
<option name="screenY" value="2142" />
|
|
104
|
+
</PersistentDeviceSelectionData>
|
|
105
|
+
<PersistentDeviceSelectionData>
|
|
106
|
+
<option name="api" value="34" />
|
|
107
|
+
<option name="brand" value="google" />
|
|
108
|
+
<option name="codename" value="comet" />
|
|
109
|
+
<option name="id" value="comet" />
|
|
110
|
+
<option name="manufacturer" value="Google" />
|
|
111
|
+
<option name="name" value="Pixel 9 Pro Fold" />
|
|
112
|
+
<option name="screenDensity" value="390" />
|
|
113
|
+
<option name="screenX" value="2076" />
|
|
114
|
+
<option name="screenY" value="2152" />
|
|
115
|
+
</PersistentDeviceSelectionData>
|
|
116
|
+
<PersistentDeviceSelectionData>
|
|
117
|
+
<option name="api" value="29" />
|
|
118
|
+
<option name="brand" value="samsung" />
|
|
119
|
+
<option name="codename" value="crownqlteue" />
|
|
120
|
+
<option name="id" value="crownqlteue" />
|
|
121
|
+
<option name="manufacturer" value="Samsung" />
|
|
122
|
+
<option name="name" value="Galaxy Note9" />
|
|
123
|
+
<option name="screenDensity" value="420" />
|
|
124
|
+
<option name="screenX" value="2220" />
|
|
125
|
+
<option name="screenY" value="1080" />
|
|
126
|
+
</PersistentDeviceSelectionData>
|
|
127
|
+
<PersistentDeviceSelectionData>
|
|
128
|
+
<option name="api" value="34" />
|
|
129
|
+
<option name="brand" value="samsung" />
|
|
130
|
+
<option name="codename" value="dm3q" />
|
|
131
|
+
<option name="id" value="dm3q" />
|
|
132
|
+
<option name="manufacturer" value="Samsung" />
|
|
133
|
+
<option name="name" value="Galaxy S23 Ultra" />
|
|
134
|
+
<option name="screenDensity" value="600" />
|
|
135
|
+
<option name="screenX" value="1440" />
|
|
136
|
+
<option name="screenY" value="3088" />
|
|
137
|
+
</PersistentDeviceSelectionData>
|
|
138
|
+
<PersistentDeviceSelectionData>
|
|
139
|
+
<option name="api" value="34" />
|
|
140
|
+
<option name="brand" value="samsung" />
|
|
141
|
+
<option name="codename" value="e1q" />
|
|
142
|
+
<option name="id" value="e1q" />
|
|
143
|
+
<option name="manufacturer" value="Samsung" />
|
|
144
|
+
<option name="name" value="Galaxy S24" />
|
|
145
|
+
<option name="screenDensity" value="480" />
|
|
146
|
+
<option name="screenX" value="1080" />
|
|
147
|
+
<option name="screenY" value="2340" />
|
|
148
|
+
</PersistentDeviceSelectionData>
|
|
149
|
+
<PersistentDeviceSelectionData>
|
|
150
|
+
<option name="api" value="33" />
|
|
151
|
+
<option name="brand" value="google" />
|
|
152
|
+
<option name="codename" value="felix" />
|
|
153
|
+
<option name="id" value="felix" />
|
|
154
|
+
<option name="manufacturer" value="Google" />
|
|
155
|
+
<option name="name" value="Pixel Fold" />
|
|
156
|
+
<option name="screenDensity" value="420" />
|
|
157
|
+
<option name="screenX" value="2208" />
|
|
158
|
+
<option name="screenY" value="1840" />
|
|
159
|
+
</PersistentDeviceSelectionData>
|
|
160
|
+
<PersistentDeviceSelectionData>
|
|
161
|
+
<option name="api" value="34" />
|
|
162
|
+
<option name="brand" value="google" />
|
|
163
|
+
<option name="codename" value="felix" />
|
|
164
|
+
<option name="id" value="felix" />
|
|
165
|
+
<option name="manufacturer" value="Google" />
|
|
166
|
+
<option name="name" value="Pixel Fold" />
|
|
167
|
+
<option name="screenDensity" value="420" />
|
|
168
|
+
<option name="screenX" value="2208" />
|
|
169
|
+
<option name="screenY" value="1840" />
|
|
170
|
+
</PersistentDeviceSelectionData>
|
|
171
|
+
<PersistentDeviceSelectionData>
|
|
172
|
+
<option name="api" value="33" />
|
|
173
|
+
<option name="brand" value="google" />
|
|
174
|
+
<option name="codename" value="felix_camera" />
|
|
175
|
+
<option name="id" value="felix_camera" />
|
|
176
|
+
<option name="manufacturer" value="Google" />
|
|
177
|
+
<option name="name" value="Pixel Fold (Camera-enabled)" />
|
|
178
|
+
<option name="screenDensity" value="420" />
|
|
179
|
+
<option name="screenX" value="2208" />
|
|
180
|
+
<option name="screenY" value="1840" />
|
|
181
|
+
</PersistentDeviceSelectionData>
|
|
182
|
+
<PersistentDeviceSelectionData>
|
|
183
|
+
<option name="api" value="33" />
|
|
184
|
+
<option name="brand" value="samsung" />
|
|
185
|
+
<option name="codename" value="gts8uwifi" />
|
|
186
|
+
<option name="id" value="gts8uwifi" />
|
|
187
|
+
<option name="manufacturer" value="Samsung" />
|
|
188
|
+
<option name="name" value="Galaxy Tab S8 Ultra" />
|
|
189
|
+
<option name="screenDensity" value="320" />
|
|
190
|
+
<option name="screenX" value="1848" />
|
|
191
|
+
<option name="screenY" value="2960" />
|
|
192
|
+
</PersistentDeviceSelectionData>
|
|
193
|
+
<PersistentDeviceSelectionData>
|
|
194
|
+
<option name="api" value="34" />
|
|
195
|
+
<option name="brand" value="google" />
|
|
196
|
+
<option name="codename" value="husky" />
|
|
197
|
+
<option name="id" value="husky" />
|
|
198
|
+
<option name="manufacturer" value="Google" />
|
|
199
|
+
<option name="name" value="Pixel 8 Pro" />
|
|
200
|
+
<option name="screenDensity" value="390" />
|
|
201
|
+
<option name="screenX" value="1008" />
|
|
202
|
+
<option name="screenY" value="2244" />
|
|
203
|
+
</PersistentDeviceSelectionData>
|
|
204
|
+
<PersistentDeviceSelectionData>
|
|
205
|
+
<option name="api" value="30" />
|
|
206
|
+
<option name="brand" value="motorola" />
|
|
207
|
+
<option name="codename" value="java" />
|
|
208
|
+
<option name="id" value="java" />
|
|
209
|
+
<option name="manufacturer" value="Motorola" />
|
|
210
|
+
<option name="name" value="G20" />
|
|
211
|
+
<option name="screenDensity" value="280" />
|
|
212
|
+
<option name="screenX" value="720" />
|
|
213
|
+
<option name="screenY" value="1600" />
|
|
214
|
+
</PersistentDeviceSelectionData>
|
|
215
|
+
<PersistentDeviceSelectionData>
|
|
216
|
+
<option name="api" value="34" />
|
|
217
|
+
<option name="brand" value="google" />
|
|
218
|
+
<option name="codename" value="komodo" />
|
|
219
|
+
<option name="id" value="komodo" />
|
|
220
|
+
<option name="manufacturer" value="Google" />
|
|
221
|
+
<option name="name" value="Pixel 9 Pro XL" />
|
|
222
|
+
<option name="screenDensity" value="360" />
|
|
223
|
+
<option name="screenX" value="1008" />
|
|
224
|
+
<option name="screenY" value="2244" />
|
|
225
|
+
</PersistentDeviceSelectionData>
|
|
226
|
+
<PersistentDeviceSelectionData>
|
|
227
|
+
<option name="api" value="33" />
|
|
228
|
+
<option name="brand" value="google" />
|
|
229
|
+
<option name="codename" value="lynx" />
|
|
230
|
+
<option name="id" value="lynx" />
|
|
231
|
+
<option name="manufacturer" value="Google" />
|
|
232
|
+
<option name="name" value="Pixel 7a" />
|
|
233
|
+
<option name="screenDensity" value="420" />
|
|
234
|
+
<option name="screenX" value="1080" />
|
|
235
|
+
<option name="screenY" value="2400" />
|
|
236
|
+
</PersistentDeviceSelectionData>
|
|
237
|
+
<PersistentDeviceSelectionData>
|
|
238
|
+
<option name="api" value="31" />
|
|
239
|
+
<option name="brand" value="google" />
|
|
240
|
+
<option name="codename" value="oriole" />
|
|
241
|
+
<option name="id" value="oriole" />
|
|
242
|
+
<option name="manufacturer" value="Google" />
|
|
243
|
+
<option name="name" value="Pixel 6" />
|
|
244
|
+
<option name="screenDensity" value="420" />
|
|
245
|
+
<option name="screenX" value="1080" />
|
|
246
|
+
<option name="screenY" value="2400" />
|
|
247
|
+
</PersistentDeviceSelectionData>
|
|
248
|
+
<PersistentDeviceSelectionData>
|
|
249
|
+
<option name="api" value="33" />
|
|
250
|
+
<option name="brand" value="google" />
|
|
251
|
+
<option name="codename" value="panther" />
|
|
252
|
+
<option name="id" value="panther" />
|
|
253
|
+
<option name="manufacturer" value="Google" />
|
|
254
|
+
<option name="name" value="Pixel 7" />
|
|
255
|
+
<option name="screenDensity" value="420" />
|
|
256
|
+
<option name="screenX" value="1080" />
|
|
257
|
+
<option name="screenY" value="2400" />
|
|
258
|
+
</PersistentDeviceSelectionData>
|
|
259
|
+
<PersistentDeviceSelectionData>
|
|
260
|
+
<option name="api" value="34" />
|
|
261
|
+
<option name="brand" value="samsung" />
|
|
262
|
+
<option name="codename" value="q5q" />
|
|
263
|
+
<option name="id" value="q5q" />
|
|
264
|
+
<option name="manufacturer" value="Samsung" />
|
|
265
|
+
<option name="name" value="Galaxy Z Fold5" />
|
|
266
|
+
<option name="screenDensity" value="420" />
|
|
267
|
+
<option name="screenX" value="1812" />
|
|
268
|
+
<option name="screenY" value="2176" />
|
|
269
|
+
</PersistentDeviceSelectionData>
|
|
270
|
+
<PersistentDeviceSelectionData>
|
|
271
|
+
<option name="api" value="34" />
|
|
272
|
+
<option name="brand" value="samsung" />
|
|
273
|
+
<option name="codename" value="q6q" />
|
|
274
|
+
<option name="id" value="q6q" />
|
|
275
|
+
<option name="manufacturer" value="Samsung" />
|
|
276
|
+
<option name="name" value="Galaxy Z Fold6" />
|
|
277
|
+
<option name="screenDensity" value="420" />
|
|
278
|
+
<option name="screenX" value="1856" />
|
|
279
|
+
<option name="screenY" value="2160" />
|
|
280
|
+
</PersistentDeviceSelectionData>
|
|
281
|
+
<PersistentDeviceSelectionData>
|
|
282
|
+
<option name="api" value="30" />
|
|
283
|
+
<option name="brand" value="google" />
|
|
284
|
+
<option name="codename" value="r11" />
|
|
285
|
+
<option name="id" value="r11" />
|
|
286
|
+
<option name="manufacturer" value="Google" />
|
|
287
|
+
<option name="name" value="Pixel Watch" />
|
|
288
|
+
<option name="screenDensity" value="320" />
|
|
289
|
+
<option name="screenX" value="384" />
|
|
290
|
+
<option name="screenY" value="384" />
|
|
291
|
+
<option name="type" value="WEAR_OS" />
|
|
292
|
+
</PersistentDeviceSelectionData>
|
|
293
|
+
<PersistentDeviceSelectionData>
|
|
294
|
+
<option name="api" value="30" />
|
|
295
|
+
<option name="brand" value="google" />
|
|
296
|
+
<option name="codename" value="redfin" />
|
|
297
|
+
<option name="id" value="redfin" />
|
|
298
|
+
<option name="manufacturer" value="Google" />
|
|
299
|
+
<option name="name" value="Pixel 5" />
|
|
300
|
+
<option name="screenDensity" value="440" />
|
|
301
|
+
<option name="screenX" value="1080" />
|
|
302
|
+
<option name="screenY" value="2340" />
|
|
303
|
+
</PersistentDeviceSelectionData>
|
|
304
|
+
<PersistentDeviceSelectionData>
|
|
305
|
+
<option name="api" value="34" />
|
|
306
|
+
<option name="brand" value="google" />
|
|
307
|
+
<option name="codename" value="shiba" />
|
|
308
|
+
<option name="id" value="shiba" />
|
|
309
|
+
<option name="manufacturer" value="Google" />
|
|
310
|
+
<option name="name" value="Pixel 8" />
|
|
311
|
+
<option name="screenDensity" value="420" />
|
|
312
|
+
<option name="screenX" value="1080" />
|
|
313
|
+
<option name="screenY" value="2400" />
|
|
314
|
+
</PersistentDeviceSelectionData>
|
|
315
|
+
<PersistentDeviceSelectionData>
|
|
316
|
+
<option name="api" value="33" />
|
|
317
|
+
<option name="brand" value="google" />
|
|
318
|
+
<option name="codename" value="tangorpro" />
|
|
319
|
+
<option name="id" value="tangorpro" />
|
|
320
|
+
<option name="manufacturer" value="Google" />
|
|
321
|
+
<option name="name" value="Pixel Tablet" />
|
|
322
|
+
<option name="screenDensity" value="320" />
|
|
323
|
+
<option name="screenX" value="1600" />
|
|
324
|
+
<option name="screenY" value="2560" />
|
|
325
|
+
</PersistentDeviceSelectionData>
|
|
326
|
+
<PersistentDeviceSelectionData>
|
|
327
|
+
<option name="api" value="34" />
|
|
328
|
+
<option name="brand" value="google" />
|
|
329
|
+
<option name="codename" value="tokay" />
|
|
330
|
+
<option name="id" value="tokay" />
|
|
331
|
+
<option name="manufacturer" value="Google" />
|
|
332
|
+
<option name="name" value="Pixel 9" />
|
|
333
|
+
<option name="screenDensity" value="420" />
|
|
334
|
+
<option name="screenX" value="1080" />
|
|
335
|
+
<option name="screenY" value="2424" />
|
|
336
|
+
</PersistentDeviceSelectionData>
|
|
337
|
+
</list>
|
|
338
|
+
</option>
|
|
339
|
+
</component>
|
|
340
|
+
</project>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$" />
|
|
6
|
+
<orderEntry type="inheritedJdk" />
|
|
7
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
+
</component>
|
|
9
|
+
</module>
|
package/.idea/misc.xml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/em-MobileCheckoutSDK-ReactNative.iml" filepath="$PROJECT_DIR$/.idea/em-MobileCheckoutSDK-ReactNative.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# EasyMerchantSdk React Native Implementation
|
|
2
|
+
|
|
3
|
+
To implement the EasyMerchantSdk in your React Native App project. Follow the below steps:
|
|
4
|
+
|
|
5
|
+
## Add the sdk path in your project.
|
|
6
|
+
To add the path of sdk in your project. Open your `package.json` file and inside the `dependencies` section, add the below code and set the path of the sdk where you store on your disk.
|
|
7
|
+
|
|
8
|
+
```json
|
|
9
|
+
"dependencies": {
|
|
10
|
+
...
|
|
11
|
+
"easymerchantsdk-react-native": "^1.0.0"
|
|
12
|
+
},
|
|
13
|
+
```
|
|
14
|
+
or using command
|
|
15
|
+
```cmd
|
|
16
|
+
npm i easymerchantsdk-react-native
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Changes in android side.
|
|
21
|
+
Now open your `android` folder and there is a `build.gradle` file. Open it and add the below code in it.
|
|
22
|
+
```gradle
|
|
23
|
+
allprojects {
|
|
24
|
+
repositories {
|
|
25
|
+
google()
|
|
26
|
+
mavenCentral()
|
|
27
|
+
maven { url 'https://jitpack.io' }
|
|
28
|
+
maven {
|
|
29
|
+
url = uri("https://maven.pkg.github.com/EasyMerchant/em-MobileCheckoutSDK-Android")
|
|
30
|
+
credentials {
|
|
31
|
+
username = "EasyMerchant"
|
|
32
|
+
password = "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"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Changes in IOS side.
|
|
40
|
+
Add below content inside the AppDelegate.swift File :-
|
|
41
|
+
|
|
42
|
+
Create a new file named AppDelegate.swift
|
|
43
|
+
```swift
|
|
44
|
+
import UIKit
|
|
45
|
+
import easymerchantsdk
|
|
46
|
+
import React
|
|
47
|
+
|
|
48
|
+
@UIApplicationMain
|
|
49
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
50
|
+
var window: UIWindow?
|
|
51
|
+
|
|
52
|
+
func application(
|
|
53
|
+
_ application: UIApplication,
|
|
54
|
+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
|
|
55
|
+
) -> Bool {
|
|
56
|
+
let jsCodeLocation: URL
|
|
57
|
+
|
|
58
|
+
#if DEBUG
|
|
59
|
+
jsCodeLocation = URL(string: "http://localhost:8081/index.bundle?platform=ios")!
|
|
60
|
+
#else
|
|
61
|
+
jsCodeLocation = Bundle.main.url(forResource: "main", withExtension: "jsbundle")!
|
|
62
|
+
#endif
|
|
63
|
+
|
|
64
|
+
let bridge = RCTBridge(
|
|
65
|
+
bundleURL: jsCodeLocation,
|
|
66
|
+
moduleProvider: nil,
|
|
67
|
+
launchOptions: launchOptions
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
guard let validBridge = bridge else {
|
|
71
|
+
fatalError("React Native bridge failed to initialize.")
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
let rootView = RCTRootView(
|
|
75
|
+
bridge: validBridge,
|
|
76
|
+
moduleName: "EasyMerchantTestApp", // replace it with your app name
|
|
77
|
+
initialProperties: nil
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
self.window = UIWindow(frame: UIScreen.main.bounds)
|
|
81
|
+
let rootViewController = UIViewController()
|
|
82
|
+
rootViewController.view = rootView
|
|
83
|
+
self.window?.rootViewController = rootViewController
|
|
84
|
+
self.window?.makeKeyAndVisible()
|
|
85
|
+
|
|
86
|
+
if let easyMerchantSdkPlugin = bridge?.module(for: EasyMerchantSdkPlugin.self) as? EasyMerchantSdkPlugin {
|
|
87
|
+
easyMerchantSdkPlugin.setViewController(rootViewController)
|
|
88
|
+
} else {
|
|
89
|
+
print("Failed to retrieve EasyMerchantSdkPlugin instance from React Native bridge.")
|
|
90
|
+
}
|
|
91
|
+
return true
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
inside the PodFile add below
|
|
97
|
+
```pod
|
|
98
|
+
|
|
99
|
+
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
|
100
|
+
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
|
101
|
+
|
|
102
|
+
platform :ios, 16.0
|
|
103
|
+
|
|
104
|
+
pod 'easymerchantsdk', :path => '../node_modules/easymerchantsdk-react-native/ios'
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
## How to call the sdk in `App.js`.
|
|
110
|
+
you can call the sdk using below example:
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
import React, { useState, useEffect } from 'react';
|
|
115
|
+
import { View, Text, Button, StyleSheet, NativeModules, Platform } from 'react-native';
|
|
116
|
+
|
|
117
|
+
const { RNEasymerchantsdk, EasyMerchantSdk } = NativeModules;
|
|
118
|
+
|
|
119
|
+
const App = () => {
|
|
120
|
+
const [version, setVersion] = useState('');
|
|
121
|
+
const [paymentResponse, setPaymentResponse] = useState('');
|
|
122
|
+
const [billingResult, setBillingResult] = useState('');
|
|
123
|
+
|
|
124
|
+
const getPlatformVersion = async () => {
|
|
125
|
+
try {
|
|
126
|
+
if (Platform.OS === 'android') {
|
|
127
|
+
const platformVersion = await RNEasymerchantsdk.platformVersion();
|
|
128
|
+
setVersion(platformVersion);
|
|
129
|
+
} else if (Platform.OS === 'ios') {
|
|
130
|
+
const version = await EasyMerchantSdk.getPlatformVersion();
|
|
131
|
+
setVersion(version);
|
|
132
|
+
}
|
|
133
|
+
} catch (error) {
|
|
134
|
+
setVersion('Error fetching version');
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const handleBilling = async () => {
|
|
139
|
+
const amount = '100';
|
|
140
|
+
const additionalInfoRequest = {
|
|
141
|
+
name: "Test User",
|
|
142
|
+
email: "test@gmail.com",
|
|
143
|
+
phone_number: "9465351125",
|
|
144
|
+
country_code: "91",
|
|
145
|
+
description: "Test"
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const json = {
|
|
149
|
+
address: "Mohali, Punjab",
|
|
150
|
+
country: "India",
|
|
151
|
+
state: "Punjab",
|
|
152
|
+
city: "Anandpur Sahib",
|
|
153
|
+
postal_code: "140118",
|
|
154
|
+
additional_info: additionalInfoRequest
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const jsonString = JSON.stringify(json);
|
|
158
|
+
|
|
159
|
+
try {
|
|
160
|
+
if (Platform.OS === 'android') {
|
|
161
|
+
// const response = await RNEasymerchantsdk.billing(amount, null,'staging','mobilesdk1980IUuCzwWl','mobilesdk1980LVHnN0Oh');
|
|
162
|
+
const response = await RNEasymerchantsdk.billing(amount, null,'sandbox','f149cf5afc3a67c79e0aa87e7','22b9dd1e588146077ca77da82');
|
|
163
|
+
setPaymentResponse(`Payment Success: ${response}`);
|
|
164
|
+
} else if (Platform.OS === 'ios') {
|
|
165
|
+
const result = await EasyMerchantSdk.billing(amount, jsonString,'staging','mobilesdk1980IUuCzwWl','mobilesdk1980LVHnN0Oh');
|
|
166
|
+
// const result = await EasyMerchantSdk.billing(amount, jsonString,'sandbox','f149cf5afc3a67c79e0aa87e7','22b9dd1e588146077ca77da82');
|
|
167
|
+
setBillingResult(`Billing Success: ${result}`);
|
|
168
|
+
}
|
|
169
|
+
} catch (error) {
|
|
170
|
+
if (Platform.OS === 'android') {
|
|
171
|
+
setPaymentResponse(`Payment Error: ${error}`);
|
|
172
|
+
} else if (Platform.OS === 'ios') {
|
|
173
|
+
setBillingResult(`Billing Error: ${error.message || error}`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
useEffect(() => {
|
|
179
|
+
if (Platform.OS === 'ios') {
|
|
180
|
+
const initializeViewController = async () => {
|
|
181
|
+
if (EasyMerchantSdk && EasyMerchantSdk.setViewController) {
|
|
182
|
+
try {
|
|
183
|
+
await EasyMerchantSdk.setViewController();
|
|
184
|
+
console.log('ViewController set successfully');
|
|
185
|
+
} catch (error) {
|
|
186
|
+
console.error('Error setting ViewController:', error.message || error);
|
|
187
|
+
}
|
|
188
|
+
} else {
|
|
189
|
+
console.warn('EasyMerchantSdk.setViewController is not available');
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
initializeViewController();
|
|
194
|
+
}
|
|
195
|
+
}, []);
|
|
196
|
+
|
|
197
|
+
return (
|
|
198
|
+
<View style={styles.container}>
|
|
199
|
+
<Text>Platform Version: {version}</Text>
|
|
200
|
+
<Button title="Get Platform Version" onPress={getPlatformVersion} />
|
|
201
|
+
|
|
202
|
+
<Button title="Make Payment" onPress={handleBilling} />
|
|
203
|
+
|
|
204
|
+
{paymentResponse && <Text>{paymentResponse}</Text>}
|
|
205
|
+
{billingResult && <Text>{billingResult}</Text>}
|
|
206
|
+
</View>
|
|
207
|
+
);
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const styles = StyleSheet.create({
|
|
211
|
+
container: {
|
|
212
|
+
flex: 1,
|
|
213
|
+
justifyContent: 'center',
|
|
214
|
+
alignItems: 'center',
|
|
215
|
+
padding: 20,
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
export default App;
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
You can send `null` if billing info not available.
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
o/bundleLibRuntimeToDirDebug
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
o/classes
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
o/bundleLibRuntimeToDirDebug
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
o/classes
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
o/bundleLibRuntimeToDirDebug
|