react-native-payengine 2.0.6 → 2.0.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.
- package/README.md +27 -11
- package/android/.gradle/6.1.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.1.1/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.1.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/config.properties +2 -0
- package/android/.idea/caches/deviceStreaming.xml +329 -0
- package/android/.idea/gradle.xml +2 -2
- package/android/.idea/jarRepositories.xml +5 -0
- package/android/.idea/kotlinc.xml +6 -0
- package/android/.idea/migrations.xml +10 -0
- package/android/.idea/misc.xml +2 -1
- package/android/build.gradle +2 -2
- package/android/local.properties +2 -2
- package/android/payment-sdk-debug-1.0.3.aar +0 -0
- package/android/payment-sdk-release-1.0.3.aar +0 -0
- package/android/src/main/java/com/reactnativepayengine/v2/features/googlepay/RNPEGooglePayButton.kt +27 -10
- package/android/src/main/java/com/reactnativepayengine/v2/features/googlepay/RNPEGooglePayButtonManager.kt +17 -7
- package/android/src/main/java/com/reactnativepayengine/v2/features/googlepay/RNPEPaymentRequest.kt +32 -0
- package/ios/PayEngineSDK.xcframework/Info.plist +5 -5
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Frameworks/libKountDataCollector.a +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/PayEngineSDK-Swift.h +2 -2
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Info.plist +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.abi.json +742 -851
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.private.swiftinterface-e +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.swiftinterface +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.swiftinterface-e +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/PayEngineSDK +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Assets.car +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Info.plist +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Frameworks/libKountDataCollector.a +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/PayEngineSDK-Swift.h +4 -4
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Info.plist +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +742 -851
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface-e +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface-e +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +742 -851
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface-e +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface-e +2 -14
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/PayEngineSDK +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Assets.car +0 -0
- package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Info.plist +0 -0
- package/ios/Payengine.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +34 -0
- package/ios/Payengine.xcodeproj/project.xcworkspace/xcuserdata/tringuyen.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Payengine.xcodeproj/xcuserdata/tringuyen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +24 -0
- package/ios/Payengine.xcworkspace/xcuserdata/tringuyen.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/tringuyen.xcuserdatad/xcschemes/Pods-Payengine.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/tringuyen.xcuserdatad/xcschemes/VGSCollectSDK-CardIcon.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/tringuyen.xcuserdatad/xcschemes/VGSCollectSDK.xcscheme +58 -0
- package/ios/Pods/Pods.xcodeproj/xcuserdata/tringuyen.xcuserdatad/xcschemes/xcschememanagement.plist +32 -0
- package/ios/Sources/Classes/ApplePay/RNPEApplePayButton.swift +8 -7
- package/ios/Sources/Classes/ApplePay/RNPEApplePayPaymentRequest.swift +43 -4
- package/ios/Sources/Classes/RNPayEngineNative.swift +12 -10
- package/lib/commonjs/components/v2/ApplePay/PEApplePayButton.js +3 -1
- package/lib/commonjs/components/v2/ApplePay/PEApplePayButton.js.map +1 -1
- package/lib/commonjs/components/v2/GooglePay/PEGooglePayButton.js +6 -3
- package/lib/commonjs/components/v2/GooglePay/PEGooglePayButton.js.map +1 -1
- package/lib/commonjs/components/v2/PEPaymentRequest.js +71 -1
- package/lib/commonjs/components/v2/PEPaymentRequest.js.map +1 -1
- package/lib/commonjs/index.js +24 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/components/v2/ApplePay/PEApplePayButton.js +3 -1
- package/lib/module/components/v2/ApplePay/PEApplePayButton.js.map +1 -1
- package/lib/module/components/v2/GooglePay/PEGooglePayButton.js +6 -3
- package/lib/module/components/v2/GooglePay/PEGooglePayButton.js.map +1 -1
- package/lib/module/components/v2/PEPaymentRequest.js +58 -0
- package/lib/module/components/v2/PEPaymentRequest.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/components/v2/PEPaymentRequest.d.ts +39 -1
- package/lib/typescript/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/v2/ApplePay/PEApplePayButton.tsx +4 -1
- package/src/components/v2/GooglePay/PEGooglePayButton.tsx +9 -4
- package/src/components/v2/PEPaymentRequest.ts +65 -6
- package/src/index.tsx +6 -1
- package/android/.idea/libraries/Gradle__android_arch_core_common_1_0_0.xml +0 -11
- package/android/.idea/libraries/Gradle__android_arch_lifecycle_common_1_0_0.xml +0 -11
- package/android/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_2_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0.xml +0 -11
- package/android/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_autofill_autofill_1_1_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_collection_collection_1_0_0.xml +0 -11
- package/android/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_core_core_1_1_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_fragment_fragment_1_0_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_0_0.xml +0 -11
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_0_1_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_android_support_support_annotations_26_1_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_android_support_support_compat_26_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_android_support_support_core_ui_26_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_android_support_support_core_utils_26_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_android_support_support_fragment_26_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_android_support_support_media_compat_26_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_android_support_support_v4_26_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_fbjni_fbjni_java_only_0_2_2.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_2_5_0_aar.xml +0 -18
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_2_5_0_aar.xml +0 -18
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_2_5_0_aar.xml +0 -18
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_base_2_5_0_aar.xml +0 -18
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_native_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp3_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_ashmem_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_java_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_native_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_nativeimagefilters_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_nativeimagetranscoder_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_ui_common_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_infer_annotation_infer_annotation_0_18_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_68_2_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__com_facebook_soloader_annotation_0_10_3.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_soloader_nativeloader_0_10_3.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_10_3_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_yoga_proguard_annotations_1_19_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_base_15_0_1_aar.xml +0 -11
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_basement_15_0_1_aar.xml +0 -11
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_identity_15_0_1_aar.xml +0 -11
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_maps_15_0_1_aar.xml +0 -11
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_tasks_15_0_1_aar.xml +0 -11
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_wallet_16_0_0_aar.xml +0 -11
- package/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_2.xml +0 -13
- package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_4_9_2.xml +0 -13
- package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_urlconnection_4_9_2.xml +0 -13
- package/android/.idea/libraries/Gradle__com_squareup_okio_okio_2_9_0.xml +0 -13
- package/android/.idea/libraries/Gradle__javax_inject_javax_inject_1.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_annotations_jvm_1_3_72.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_4_10.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_4_10.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_4_10.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk8_1_4_10.xml +0 -13
- package/android/.idea/modules/android.androidTest.iml +0 -114
- package/android/.idea/modules/android.iml +0 -40
- package/android/.idea/modules/android.main.iml +0 -122
- package/android/.idea/modules/android.unitTest.iml +0 -109
- package/android/.idea/modules.xml +0 -11
- package/android/payment-sdk-debug-1.0.2.aar +0 -0
- package/android/payment-sdk-release-1.0.2.aar +0 -0
- package/ios/Payengine.xcodeproj/project.xcworkspace/xcuserdata/trinvh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- /package/ios/Payengine.xcodeproj/xcuserdata/{trinvh.xcuserdatad → tringuyen.xcuserdatad}/xcschemes/xcschememanagement.plist +0 -0
package/README.md
CHANGED
|
@@ -156,6 +156,7 @@ import {
|
|
|
156
156
|
PEPaymentRequest,
|
|
157
157
|
PayEngineNative,
|
|
158
158
|
PayEngineUtils,
|
|
159
|
+
RNPEContactField
|
|
159
160
|
} from 'react-native-payengine';
|
|
160
161
|
import axios from 'axios';
|
|
161
162
|
|
|
@@ -178,16 +179,21 @@ const ApplePayScreen = () => {
|
|
|
178
179
|
checkSupport();
|
|
179
180
|
}, []);
|
|
180
181
|
|
|
181
|
-
const paymentRequest
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
182
|
+
const paymentRequest: PEPaymentRequest = {
|
|
183
|
+
merchantId: MERCHANT_ID,
|
|
184
|
+
paymentAmount: 10.15,
|
|
185
|
+
currencyCode: 'USD',
|
|
186
|
+
paymentItems: [
|
|
187
|
+
{
|
|
188
|
+
amount: 10.15,
|
|
189
|
+
label: 'Total Amount',
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
platformOptions: {
|
|
193
|
+
requiredBillingContactFields: [RNPEContactField.postalAddress],
|
|
194
|
+
requiredShippingContactFields: []
|
|
195
|
+
}
|
|
196
|
+
}
|
|
191
197
|
|
|
192
198
|
const purchaseWithToken = async (token) => {
|
|
193
199
|
// send the token to your server to make a purchase
|
|
@@ -264,7 +270,17 @@ const GooglePayScreen = () => {
|
|
|
264
270
|
checkSupport();
|
|
265
271
|
}, []);
|
|
266
272
|
|
|
267
|
-
const paymentRequest =
|
|
273
|
+
const paymentRequest = {
|
|
274
|
+
paymentAmount: amount,
|
|
275
|
+
merchantId: MERCHANT_ID,
|
|
276
|
+
platformOptions: {
|
|
277
|
+
billingAddressRequired: true,
|
|
278
|
+
billingAddressParameters: {
|
|
279
|
+
format: 'FULL'
|
|
280
|
+
},
|
|
281
|
+
shippingAddressRequired: false
|
|
282
|
+
}
|
|
283
|
+
};
|
|
268
284
|
|
|
269
285
|
const purchaseWithToken = async (token) => {
|
|
270
286
|
// send the token to your server to make a purchase
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Mon Sep 09 23:15:47 ICT 2024
|
|
2
2
|
gradle.version=6.1.1
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,329 @@
|
|
|
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="28" />
|
|
19
|
+
<option name="brand" value="DOCOMO" />
|
|
20
|
+
<option name="codename" value="SH-01L" />
|
|
21
|
+
<option name="id" value="SH-01L" />
|
|
22
|
+
<option name="manufacturer" value="SHARP" />
|
|
23
|
+
<option name="name" value="AQUOS sense2 SH-01L" />
|
|
24
|
+
<option name="screenDensity" value="480" />
|
|
25
|
+
<option name="screenX" value="1080" />
|
|
26
|
+
<option name="screenY" value="2160" />
|
|
27
|
+
</PersistentDeviceSelectionData>
|
|
28
|
+
<PersistentDeviceSelectionData>
|
|
29
|
+
<option name="api" value="34" />
|
|
30
|
+
<option name="brand" value="Lenovo" />
|
|
31
|
+
<option name="codename" value="TB370FU" />
|
|
32
|
+
<option name="id" value="TB370FU" />
|
|
33
|
+
<option name="manufacturer" value="Lenovo" />
|
|
34
|
+
<option name="name" value="Tab P12" />
|
|
35
|
+
<option name="screenDensity" value="340" />
|
|
36
|
+
<option name="screenX" value="1840" />
|
|
37
|
+
<option name="screenY" value="2944" />
|
|
38
|
+
</PersistentDeviceSelectionData>
|
|
39
|
+
<PersistentDeviceSelectionData>
|
|
40
|
+
<option name="api" value="31" />
|
|
41
|
+
<option name="brand" value="samsung" />
|
|
42
|
+
<option name="codename" value="a51" />
|
|
43
|
+
<option name="id" value="a51" />
|
|
44
|
+
<option name="manufacturer" value="Samsung" />
|
|
45
|
+
<option name="name" value="Galaxy A51" />
|
|
46
|
+
<option name="screenDensity" value="420" />
|
|
47
|
+
<option name="screenX" value="1080" />
|
|
48
|
+
<option name="screenY" value="2400" />
|
|
49
|
+
</PersistentDeviceSelectionData>
|
|
50
|
+
<PersistentDeviceSelectionData>
|
|
51
|
+
<option name="api" value="34" />
|
|
52
|
+
<option name="brand" value="google" />
|
|
53
|
+
<option name="codename" value="akita" />
|
|
54
|
+
<option name="id" value="akita" />
|
|
55
|
+
<option name="manufacturer" value="Google" />
|
|
56
|
+
<option name="name" value="Pixel 8a" />
|
|
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="33" />
|
|
63
|
+
<option name="brand" value="samsung" />
|
|
64
|
+
<option name="codename" value="b0q" />
|
|
65
|
+
<option name="id" value="b0q" />
|
|
66
|
+
<option name="manufacturer" value="Samsung" />
|
|
67
|
+
<option name="name" value="Galaxy S22 Ultra" />
|
|
68
|
+
<option name="screenDensity" value="600" />
|
|
69
|
+
<option name="screenX" value="1440" />
|
|
70
|
+
<option name="screenY" value="3088" />
|
|
71
|
+
</PersistentDeviceSelectionData>
|
|
72
|
+
<PersistentDeviceSelectionData>
|
|
73
|
+
<option name="api" value="32" />
|
|
74
|
+
<option name="brand" value="google" />
|
|
75
|
+
<option name="codename" value="bluejay" />
|
|
76
|
+
<option name="id" value="bluejay" />
|
|
77
|
+
<option name="manufacturer" value="Google" />
|
|
78
|
+
<option name="name" value="Pixel 6a" />
|
|
79
|
+
<option name="screenDensity" value="420" />
|
|
80
|
+
<option name="screenX" value="1080" />
|
|
81
|
+
<option name="screenY" value="2400" />
|
|
82
|
+
</PersistentDeviceSelectionData>
|
|
83
|
+
<PersistentDeviceSelectionData>
|
|
84
|
+
<option name="api" value="34" />
|
|
85
|
+
<option name="brand" value="google" />
|
|
86
|
+
<option name="codename" value="caiman" />
|
|
87
|
+
<option name="id" value="caiman" />
|
|
88
|
+
<option name="manufacturer" value="Google" />
|
|
89
|
+
<option name="name" value="Pixel 9 Pro" />
|
|
90
|
+
<option name="screenDensity" value="360" />
|
|
91
|
+
<option name="screenX" value="960" />
|
|
92
|
+
<option name="screenY" value="2142" />
|
|
93
|
+
</PersistentDeviceSelectionData>
|
|
94
|
+
<PersistentDeviceSelectionData>
|
|
95
|
+
<option name="api" value="34" />
|
|
96
|
+
<option name="brand" value="google" />
|
|
97
|
+
<option name="codename" value="comet" />
|
|
98
|
+
<option name="id" value="comet" />
|
|
99
|
+
<option name="manufacturer" value="Google" />
|
|
100
|
+
<option name="name" value="Pixel 9 Pro Fold" />
|
|
101
|
+
<option name="screenDensity" value="390" />
|
|
102
|
+
<option name="screenX" value="2076" />
|
|
103
|
+
<option name="screenY" value="2152" />
|
|
104
|
+
</PersistentDeviceSelectionData>
|
|
105
|
+
<PersistentDeviceSelectionData>
|
|
106
|
+
<option name="api" value="29" />
|
|
107
|
+
<option name="brand" value="samsung" />
|
|
108
|
+
<option name="codename" value="crownqlteue" />
|
|
109
|
+
<option name="id" value="crownqlteue" />
|
|
110
|
+
<option name="manufacturer" value="Samsung" />
|
|
111
|
+
<option name="name" value="Galaxy Note9" />
|
|
112
|
+
<option name="screenDensity" value="420" />
|
|
113
|
+
<option name="screenX" value="2220" />
|
|
114
|
+
<option name="screenY" value="1080" />
|
|
115
|
+
</PersistentDeviceSelectionData>
|
|
116
|
+
<PersistentDeviceSelectionData>
|
|
117
|
+
<option name="api" value="34" />
|
|
118
|
+
<option name="brand" value="samsung" />
|
|
119
|
+
<option name="codename" value="dm3q" />
|
|
120
|
+
<option name="id" value="dm3q" />
|
|
121
|
+
<option name="manufacturer" value="Samsung" />
|
|
122
|
+
<option name="name" value="Galaxy S23 Ultra" />
|
|
123
|
+
<option name="screenDensity" value="600" />
|
|
124
|
+
<option name="screenX" value="1440" />
|
|
125
|
+
<option name="screenY" value="3088" />
|
|
126
|
+
</PersistentDeviceSelectionData>
|
|
127
|
+
<PersistentDeviceSelectionData>
|
|
128
|
+
<option name="api" value="34" />
|
|
129
|
+
<option name="brand" value="samsung" />
|
|
130
|
+
<option name="codename" value="e1q" />
|
|
131
|
+
<option name="id" value="e1q" />
|
|
132
|
+
<option name="manufacturer" value="Samsung" />
|
|
133
|
+
<option name="name" value="Galaxy S24" />
|
|
134
|
+
<option name="screenDensity" value="480" />
|
|
135
|
+
<option name="screenX" value="1080" />
|
|
136
|
+
<option name="screenY" value="2340" />
|
|
137
|
+
</PersistentDeviceSelectionData>
|
|
138
|
+
<PersistentDeviceSelectionData>
|
|
139
|
+
<option name="api" value="33" />
|
|
140
|
+
<option name="brand" value="google" />
|
|
141
|
+
<option name="codename" value="felix" />
|
|
142
|
+
<option name="id" value="felix" />
|
|
143
|
+
<option name="manufacturer" value="Google" />
|
|
144
|
+
<option name="name" value="Pixel Fold" />
|
|
145
|
+
<option name="screenDensity" value="420" />
|
|
146
|
+
<option name="screenX" value="2208" />
|
|
147
|
+
<option name="screenY" value="1840" />
|
|
148
|
+
</PersistentDeviceSelectionData>
|
|
149
|
+
<PersistentDeviceSelectionData>
|
|
150
|
+
<option name="api" value="34" />
|
|
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="33" />
|
|
162
|
+
<option name="brand" value="google" />
|
|
163
|
+
<option name="codename" value="felix_camera" />
|
|
164
|
+
<option name="id" value="felix_camera" />
|
|
165
|
+
<option name="manufacturer" value="Google" />
|
|
166
|
+
<option name="name" value="Pixel Fold (Camera-enabled)" />
|
|
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="samsung" />
|
|
174
|
+
<option name="codename" value="gts8uwifi" />
|
|
175
|
+
<option name="id" value="gts8uwifi" />
|
|
176
|
+
<option name="manufacturer" value="Samsung" />
|
|
177
|
+
<option name="name" value="Galaxy Tab S8 Ultra" />
|
|
178
|
+
<option name="screenDensity" value="320" />
|
|
179
|
+
<option name="screenX" value="1848" />
|
|
180
|
+
<option name="screenY" value="2960" />
|
|
181
|
+
</PersistentDeviceSelectionData>
|
|
182
|
+
<PersistentDeviceSelectionData>
|
|
183
|
+
<option name="api" value="34" />
|
|
184
|
+
<option name="brand" value="google" />
|
|
185
|
+
<option name="codename" value="husky" />
|
|
186
|
+
<option name="id" value="husky" />
|
|
187
|
+
<option name="manufacturer" value="Google" />
|
|
188
|
+
<option name="name" value="Pixel 8 Pro" />
|
|
189
|
+
<option name="screenDensity" value="390" />
|
|
190
|
+
<option name="screenX" value="1008" />
|
|
191
|
+
<option name="screenY" value="2244" />
|
|
192
|
+
</PersistentDeviceSelectionData>
|
|
193
|
+
<PersistentDeviceSelectionData>
|
|
194
|
+
<option name="api" value="30" />
|
|
195
|
+
<option name="brand" value="motorola" />
|
|
196
|
+
<option name="codename" value="java" />
|
|
197
|
+
<option name="id" value="java" />
|
|
198
|
+
<option name="manufacturer" value="Motorola" />
|
|
199
|
+
<option name="name" value="G20" />
|
|
200
|
+
<option name="screenDensity" value="280" />
|
|
201
|
+
<option name="screenX" value="720" />
|
|
202
|
+
<option name="screenY" value="1600" />
|
|
203
|
+
</PersistentDeviceSelectionData>
|
|
204
|
+
<PersistentDeviceSelectionData>
|
|
205
|
+
<option name="api" value="34" />
|
|
206
|
+
<option name="brand" value="google" />
|
|
207
|
+
<option name="codename" value="komodo" />
|
|
208
|
+
<option name="id" value="komodo" />
|
|
209
|
+
<option name="manufacturer" value="Google" />
|
|
210
|
+
<option name="name" value="Pixel 9 Pro XL" />
|
|
211
|
+
<option name="screenDensity" value="360" />
|
|
212
|
+
<option name="screenX" value="1008" />
|
|
213
|
+
<option name="screenY" value="2244" />
|
|
214
|
+
</PersistentDeviceSelectionData>
|
|
215
|
+
<PersistentDeviceSelectionData>
|
|
216
|
+
<option name="api" value="33" />
|
|
217
|
+
<option name="brand" value="google" />
|
|
218
|
+
<option name="codename" value="lynx" />
|
|
219
|
+
<option name="id" value="lynx" />
|
|
220
|
+
<option name="manufacturer" value="Google" />
|
|
221
|
+
<option name="name" value="Pixel 7a" />
|
|
222
|
+
<option name="screenDensity" value="420" />
|
|
223
|
+
<option name="screenX" value="1080" />
|
|
224
|
+
<option name="screenY" value="2400" />
|
|
225
|
+
</PersistentDeviceSelectionData>
|
|
226
|
+
<PersistentDeviceSelectionData>
|
|
227
|
+
<option name="api" value="31" />
|
|
228
|
+
<option name="brand" value="google" />
|
|
229
|
+
<option name="codename" value="oriole" />
|
|
230
|
+
<option name="id" value="oriole" />
|
|
231
|
+
<option name="manufacturer" value="Google" />
|
|
232
|
+
<option name="name" value="Pixel 6" />
|
|
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="33" />
|
|
239
|
+
<option name="brand" value="google" />
|
|
240
|
+
<option name="codename" value="panther" />
|
|
241
|
+
<option name="id" value="panther" />
|
|
242
|
+
<option name="manufacturer" value="Google" />
|
|
243
|
+
<option name="name" value="Pixel 7" />
|
|
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="34" />
|
|
250
|
+
<option name="brand" value="samsung" />
|
|
251
|
+
<option name="codename" value="q5q" />
|
|
252
|
+
<option name="id" value="q5q" />
|
|
253
|
+
<option name="manufacturer" value="Samsung" />
|
|
254
|
+
<option name="name" value="Galaxy Z Fold5" />
|
|
255
|
+
<option name="screenDensity" value="420" />
|
|
256
|
+
<option name="screenX" value="1812" />
|
|
257
|
+
<option name="screenY" value="2176" />
|
|
258
|
+
</PersistentDeviceSelectionData>
|
|
259
|
+
<PersistentDeviceSelectionData>
|
|
260
|
+
<option name="api" value="30" />
|
|
261
|
+
<option name="brand" value="google" />
|
|
262
|
+
<option name="codename" value="r11" />
|
|
263
|
+
<option name="id" value="r11" />
|
|
264
|
+
<option name="manufacturer" value="Google" />
|
|
265
|
+
<option name="name" value="Pixel Watch" />
|
|
266
|
+
<option name="screenDensity" value="320" />
|
|
267
|
+
<option name="screenX" value="384" />
|
|
268
|
+
<option name="screenY" value="384" />
|
|
269
|
+
<option name="type" value="WEAR_OS" />
|
|
270
|
+
</PersistentDeviceSelectionData>
|
|
271
|
+
<PersistentDeviceSelectionData>
|
|
272
|
+
<option name="api" value="30" />
|
|
273
|
+
<option name="brand" value="google" />
|
|
274
|
+
<option name="codename" value="redfin" />
|
|
275
|
+
<option name="id" value="redfin" />
|
|
276
|
+
<option name="manufacturer" value="Google" />
|
|
277
|
+
<option name="name" value="Pixel 5" />
|
|
278
|
+
<option name="screenDensity" value="440" />
|
|
279
|
+
<option name="screenX" value="1080" />
|
|
280
|
+
<option name="screenY" value="2340" />
|
|
281
|
+
</PersistentDeviceSelectionData>
|
|
282
|
+
<PersistentDeviceSelectionData>
|
|
283
|
+
<option name="api" value="34" />
|
|
284
|
+
<option name="brand" value="google" />
|
|
285
|
+
<option name="codename" value="shiba" />
|
|
286
|
+
<option name="id" value="shiba" />
|
|
287
|
+
<option name="manufacturer" value="Google" />
|
|
288
|
+
<option name="name" value="Pixel 8" />
|
|
289
|
+
<option name="screenDensity" value="420" />
|
|
290
|
+
<option name="screenX" value="1080" />
|
|
291
|
+
<option name="screenY" value="2400" />
|
|
292
|
+
</PersistentDeviceSelectionData>
|
|
293
|
+
<PersistentDeviceSelectionData>
|
|
294
|
+
<option name="api" value="33" />
|
|
295
|
+
<option name="brand" value="google" />
|
|
296
|
+
<option name="codename" value="tangorpro" />
|
|
297
|
+
<option name="id" value="tangorpro" />
|
|
298
|
+
<option name="manufacturer" value="Google" />
|
|
299
|
+
<option name="name" value="Pixel Tablet" />
|
|
300
|
+
<option name="screenDensity" value="320" />
|
|
301
|
+
<option name="screenX" value="1600" />
|
|
302
|
+
<option name="screenY" value="2560" />
|
|
303
|
+
</PersistentDeviceSelectionData>
|
|
304
|
+
<PersistentDeviceSelectionData>
|
|
305
|
+
<option name="api" value="34" />
|
|
306
|
+
<option name="brand" value="google" />
|
|
307
|
+
<option name="codename" value="tokay" />
|
|
308
|
+
<option name="id" value="tokay" />
|
|
309
|
+
<option name="manufacturer" value="Google" />
|
|
310
|
+
<option name="name" value="Pixel 9" />
|
|
311
|
+
<option name="screenDensity" value="420" />
|
|
312
|
+
<option name="screenX" value="1080" />
|
|
313
|
+
<option name="screenY" value="2424" />
|
|
314
|
+
</PersistentDeviceSelectionData>
|
|
315
|
+
<PersistentDeviceSelectionData>
|
|
316
|
+
<option name="api" value="29" />
|
|
317
|
+
<option name="brand" value="samsung" />
|
|
318
|
+
<option name="codename" value="x1q" />
|
|
319
|
+
<option name="id" value="x1q" />
|
|
320
|
+
<option name="manufacturer" value="Samsung" />
|
|
321
|
+
<option name="name" value="Galaxy S20" />
|
|
322
|
+
<option name="screenDensity" value="480" />
|
|
323
|
+
<option name="screenX" value="1440" />
|
|
324
|
+
<option name="screenY" value="3200" />
|
|
325
|
+
</PersistentDeviceSelectionData>
|
|
326
|
+
</list>
|
|
327
|
+
</option>
|
|
328
|
+
</component>
|
|
329
|
+
</project>
|
package/android/.idea/gradle.xml
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
<component name="GradleSettings">
|
|
5
5
|
<option name="linkedExternalProjectsSettings">
|
|
6
6
|
<GradleProjectSettings>
|
|
7
|
-
<option name="testRunner" value="GRADLE" />
|
|
8
|
-
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
|
9
7
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
|
8
|
+
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
|
10
9
|
<option name="modules">
|
|
11
10
|
<set>
|
|
12
11
|
<option value="$PROJECT_DIR$" />
|
|
13
12
|
</set>
|
|
14
13
|
</option>
|
|
14
|
+
<option name="resolveExternalAnnotations" value="false" />
|
|
15
15
|
</GradleProjectSettings>
|
|
16
16
|
</option>
|
|
17
17
|
</component>
|
|
@@ -26,5 +26,10 @@
|
|
|
26
26
|
<option name="name" value="Google" />
|
|
27
27
|
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
|
28
28
|
</remote-repository>
|
|
29
|
+
<remote-repository>
|
|
30
|
+
<option name="id" value="com.verygoodsecurity" />
|
|
31
|
+
<option name="name" value="com.verygoodsecurity" />
|
|
32
|
+
<option name="url" value="https://mvnrepository.com/artifact/com.verygoodsecurity/vgscollect" />
|
|
33
|
+
</remote-repository>
|
|
29
34
|
</component>
|
|
30
35
|
</project>
|
package/android/.idea/misc.xml
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project version="4">
|
|
3
|
-
<component name="
|
|
3
|
+
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
|
4
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="adopt-11" project-jdk-type="JavaSDK">
|
|
4
5
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
|
5
6
|
</component>
|
|
6
7
|
<component name="ProjectType">
|
package/android/build.gradle
CHANGED
|
@@ -164,8 +164,8 @@ dependencies {
|
|
|
164
164
|
|
|
165
165
|
implementation files("./securefields-1.7.2-debug.aar")
|
|
166
166
|
|
|
167
|
-
debugImplementation files("./payment-sdk-debug-1.0.
|
|
168
|
-
releaseImplementation files("./payment-sdk-debug-1.0.
|
|
167
|
+
debugImplementation files("./payment-sdk-debug-1.0.3.aar")
|
|
168
|
+
releaseImplementation files("./payment-sdk-debug-1.0.3.aar")
|
|
169
169
|
|
|
170
170
|
api 'com.github.Kount:kount-android-sdk:v4.3.2'
|
|
171
171
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
|
package/android/local.properties
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
# Location of the SDK. This is only used by Gradle.
|
|
5
5
|
# For customization when using a Version Control System, please read the
|
|
6
6
|
# header note.
|
|
7
|
-
#
|
|
8
|
-
sdk.dir=/Users/
|
|
7
|
+
#Tue Sep 20 09:54:08 ICT 2022
|
|
8
|
+
sdk.dir=/Users/tringuyen/Library/Android/sdk
|
|
Binary file
|
|
Binary file
|
package/android/src/main/java/com/reactnativepayengine/v2/features/googlepay/RNPEGooglePayButton.kt
CHANGED
|
@@ -7,6 +7,7 @@ import android.widget.LinearLayout
|
|
|
7
7
|
import com.facebook.react.bridge.Arguments
|
|
8
8
|
import com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter
|
|
9
9
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
10
|
+
import com.google.gson.Gson
|
|
10
11
|
import com.payengine.paymentsdk.features.googlepay.PEGooglePayDelegate
|
|
11
12
|
import com.payengine.paymentsdk.features.googlepay.PEGooglePayStatus
|
|
12
13
|
import com.payengine.paymentsdk.features.googlepay.nmi.GooglePayPaymentRequest
|
|
@@ -16,8 +17,8 @@ import com.reactnativepayengine.v2.securefields.RNPEEvents
|
|
|
16
17
|
class RNPEGooglePayButton(private val context: ThemedReactContext, private val activity: Activity?): LinearLayout(context),
|
|
17
18
|
PEGooglePayDelegate {
|
|
18
19
|
|
|
19
|
-
private var amount: Double? = null
|
|
20
20
|
private var merchantId: String? = null
|
|
21
|
+
private var paymentRequest: GooglePayPaymentRequest? = null
|
|
21
22
|
|
|
22
23
|
init {
|
|
23
24
|
this.orientation = VERTICAL
|
|
@@ -28,18 +29,34 @@ class RNPEGooglePayButton(private val context: ThemedReactContext, private val a
|
|
|
28
29
|
this.layoutParams = layoutParams
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
fun setAmount(amount: Double) {
|
|
32
|
-
this.amount = amount
|
|
33
|
-
this.setupView()
|
|
34
|
-
}
|
|
32
|
+
// fun setAmount(amount: Double) {
|
|
33
|
+
// this.amount = amount
|
|
34
|
+
// this.setupView()
|
|
35
|
+
// }
|
|
36
|
+
//
|
|
37
|
+
// fun setMerchantId(merchantId: String) {
|
|
38
|
+
// this.merchantId = merchantId
|
|
39
|
+
// this.setupView()
|
|
40
|
+
// }
|
|
41
|
+
|
|
42
|
+
fun setPaymentRequest(text: String) {
|
|
43
|
+
Log.d("TEST", "Received pm request $text")
|
|
44
|
+
val rnPaymentRequest = Gson().fromJson(text, RNPEPaymentRequest::class.java)
|
|
45
|
+
val paymentRequest = rnPaymentRequest.toSDKRequest()
|
|
46
|
+
Log.d("TEST", "Decoded ${Gson().toJson(paymentRequest)}")
|
|
47
|
+
this.paymentRequest = paymentRequest
|
|
48
|
+
this.merchantId = rnPaymentRequest.merchantId
|
|
35
49
|
|
|
36
|
-
fun setMerchantId(merchantId: String) {
|
|
37
|
-
this.merchantId = merchantId
|
|
38
50
|
this.setupView()
|
|
39
51
|
}
|
|
40
52
|
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
internal fun setupView() {
|
|
54
|
+
Log.d("TEST", "setupView is called")
|
|
55
|
+
// if (amount == null || merchantId == null) return
|
|
56
|
+
if (paymentRequest == null) {
|
|
57
|
+
Log.d("TEST", "setupView is called but stopped here")
|
|
58
|
+
return
|
|
59
|
+
}
|
|
43
60
|
|
|
44
61
|
this.activity?.let {
|
|
45
62
|
RNPayEngineNative.instance?.createGooglePay(it, this.merchantId!!) {
|
|
@@ -48,7 +65,7 @@ class RNPEGooglePayButton(private val context: ThemedReactContext, private val a
|
|
|
48
65
|
RNPayEngineNative.googlePay = googlepay
|
|
49
66
|
|
|
50
67
|
googlepay.delegate = this
|
|
51
|
-
googlepay.setupGooglePayButton(
|
|
68
|
+
googlepay.setupGooglePayButton(this.paymentRequest!!) {
|
|
52
69
|
if (it != null) {
|
|
53
70
|
this.addView(it)
|
|
54
71
|
} else {
|
|
@@ -13,14 +13,19 @@ import com.reactnativepayengine.v2.RNPayEngineNative
|
|
|
13
13
|
class RNPEGooglePayButtonManager: SimpleViewManager<RNPEGooglePayButton> {
|
|
14
14
|
private var context: ReactApplicationContext
|
|
15
15
|
|
|
16
|
-
@ReactProp(name = "amount")
|
|
17
|
-
fun setAmount(view: RNPEGooglePayButton, amount: Double) {
|
|
18
|
-
view.setAmount(amount)
|
|
19
|
-
}
|
|
16
|
+
// @ReactProp(name = "amount")
|
|
17
|
+
// fun setAmount(view: RNPEGooglePayButton, amount: Double) {
|
|
18
|
+
// view.setAmount(amount)
|
|
19
|
+
// }
|
|
20
|
+
//
|
|
21
|
+
// @ReactProp(name = "merchantId")
|
|
22
|
+
// fun setMerchantId(view: RNPEGooglePayButton, merchantId: String) {
|
|
23
|
+
// view.setMerchantId(merchantId)
|
|
24
|
+
// }
|
|
20
25
|
|
|
21
|
-
@ReactProp(name = "
|
|
22
|
-
fun
|
|
23
|
-
view.
|
|
26
|
+
@ReactProp(name = "paymentRequest")
|
|
27
|
+
fun setPaymentRequest(view: RNPEGooglePayButton, paymentRequest: String) {
|
|
28
|
+
view.setPaymentRequest(paymentRequest)
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
|
|
@@ -38,6 +43,11 @@ class RNPEGooglePayButtonManager: SimpleViewManager<RNPEGooglePayButton> {
|
|
|
38
43
|
return RNPEGooglePayButton(reactContext, context.currentActivity)
|
|
39
44
|
}
|
|
40
45
|
|
|
46
|
+
// override fun onAfterUpdateTransaction(view: RNPEGooglePayButton) {
|
|
47
|
+
// super.onAfterUpdateTransaction(view)
|
|
48
|
+
// view.setupView()
|
|
49
|
+
// }
|
|
50
|
+
|
|
41
51
|
|
|
42
52
|
companion object {
|
|
43
53
|
private const val REACT_CLASS = "RNPEGooglePayButton"
|
package/android/src/main/java/com/reactnativepayengine/v2/features/googlepay/RNPEPaymentRequest.kt
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
package com.reactnativepayengine.v2.features.googlepay
|
|
2
|
+
|
|
3
|
+
import com.payengine.paymentsdk.features.googlepay.nmi.GooglePayPaymentRequest
|
|
4
|
+
import org.json.JSONObject
|
|
5
|
+
|
|
6
|
+
data class RNPEPaymentItem(
|
|
7
|
+
val label: String,
|
|
8
|
+
val amount: Double,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
data class RNPEPaymentRequest(
|
|
12
|
+
val merchantId: String,
|
|
13
|
+
val paymentAmount: Double,
|
|
14
|
+
val currencyCode: String,
|
|
15
|
+
val paymentItems: List<RNPEPaymentItem>,
|
|
16
|
+
var billingAddressRequired: Boolean = true,
|
|
17
|
+
var shippingAddressRequired: Boolean = false,
|
|
18
|
+
var billingAddressParameters: JSONObject? = null,
|
|
19
|
+
var shippingAddressParameters: JSONObject? = null
|
|
20
|
+
) {
|
|
21
|
+
|
|
22
|
+
fun toSDKRequest(): GooglePayPaymentRequest {
|
|
23
|
+
val paymentRequest = GooglePayPaymentRequest(
|
|
24
|
+
paymentAmount = this.paymentAmount,
|
|
25
|
+
billingAddressRequired = this.billingAddressRequired,
|
|
26
|
+
billingAddressParameters = this.billingAddressParameters,
|
|
27
|
+
shippingAddressRequired = this.shippingAddressRequired,
|
|
28
|
+
shippingAddressParameters = this.shippingAddressParameters
|
|
29
|
+
)
|
|
30
|
+
return paymentRequest
|
|
31
|
+
}
|
|
32
|
+
}
|