react-native-payengine 2.0.6 → 2.0.8
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 +26 -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 +33 -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 +20 -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 +7 -7
- package/ios/Sources/Classes/ApplePay/RNPEApplePayPaymentRequest.swift +41 -2
- 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
|
@@ -180,19 +180,7 @@ public struct ApplePayConfigDataResponse : Swift.Codable {
|
|
|
180
180
|
public init(from decoder: any Swift.Decoder) throws
|
|
181
181
|
}
|
|
182
182
|
@_inheritsConvenienceInitializers @objc public class ApplePayPaymentRequest : ObjectiveC.NSObject {
|
|
183
|
-
public
|
|
184
|
-
get
|
|
185
|
-
set
|
|
186
|
-
}
|
|
187
|
-
public var paymentAmount: Swift.Double {
|
|
188
|
-
get
|
|
189
|
-
set
|
|
190
|
-
}
|
|
191
|
-
public var appleRequest: PassKit.PKPaymentRequest {
|
|
192
|
-
get
|
|
193
|
-
set
|
|
194
|
-
}
|
|
195
|
-
@objc public func build(paymentItems: [PassKit.PKPaymentSummaryItem] = [], paymentAmount: Swift.Double, currencyCode: Swift.String = "USD")
|
|
183
|
+
@objc public func build(paymentItems: [PassKit.PKPaymentSummaryItem] = [], paymentAmount: Swift.Double, currencyCode: Swift.String = "USD", requiredBillingContactFields: Swift.Set<PassKit.PKContactField> = [], requiredShippingContactFields: Swift.Set<PassKit.PKContactField> = [])
|
|
196
184
|
@objc override dynamic public init()
|
|
197
185
|
@objc deinit
|
|
198
186
|
}
|
|
@@ -282,7 +270,7 @@ public enum PEKeyboardType {
|
|
|
282
270
|
@objc func paymentError(error: any Swift.Error)
|
|
283
271
|
@objc func paymentSheetDidMDismiss()
|
|
284
272
|
@objc func paymentTokenDidReturn(token: Swift.String, completion: @escaping (PEApplePayResult) -> Swift.Void)
|
|
285
|
-
@objc func paymentTokenNotAvailable()
|
|
273
|
+
@objc func paymentTokenNotAvailable(error: (any Swift.Error)?)
|
|
286
274
|
}
|
|
287
275
|
extension UIKit.UIView {
|
|
288
276
|
@_Concurrency.MainActor(unsafe) public func pinEdges(to view: UIKit.UIView)
|
|
@@ -180,19 +180,7 @@ public struct ApplePayConfigDataResponse : Swift.Codable {
|
|
|
180
180
|
public init(from decoder: any Swift.Decoder) throws
|
|
181
181
|
}
|
|
182
182
|
@_inheritsConvenienceInitializers @objc public class ApplePayPaymentRequest : ObjectiveC.NSObject {
|
|
183
|
-
public
|
|
184
|
-
get
|
|
185
|
-
set
|
|
186
|
-
}
|
|
187
|
-
public var paymentAmount: Swift.Double {
|
|
188
|
-
get
|
|
189
|
-
set
|
|
190
|
-
}
|
|
191
|
-
public var appleRequest: PassKit.PKPaymentRequest {
|
|
192
|
-
get
|
|
193
|
-
set
|
|
194
|
-
}
|
|
195
|
-
@objc public func build(paymentItems: [PassKit.PKPaymentSummaryItem] = [], paymentAmount: Swift.Double, currencyCode: Swift.String = "USD")
|
|
183
|
+
@objc public func build(paymentItems: [PassKit.PKPaymentSummaryItem] = [], paymentAmount: Swift.Double, currencyCode: Swift.String = "USD", requiredBillingContactFields: Swift.Set<PassKit.PKContactField> = [], requiredShippingContactFields: Swift.Set<PassKit.PKContactField> = [])
|
|
196
184
|
@objc override dynamic public init()
|
|
197
185
|
@objc deinit
|
|
198
186
|
}
|
|
@@ -282,7 +270,7 @@ public enum PEKeyboardType {
|
|
|
282
270
|
@objc func paymentError(error: any Swift.Error)
|
|
283
271
|
@objc func paymentSheetDidMDismiss()
|
|
284
272
|
@objc func paymentTokenDidReturn(token: Swift.String, completion: @escaping (PayEngineSDK.PEApplePayResult) -> Swift.Void)
|
|
285
|
-
@objc func paymentTokenNotAvailable()
|
|
273
|
+
@objc func paymentTokenNotAvailable(error: (any Swift.Error)?)
|
|
286
274
|
}
|
|
287
275
|
extension UIKit.UIView {
|
|
288
276
|
@_Concurrency.MainActor(unsafe) public func pinEdges(to view: UIKit.UIView)
|
|
Binary file
|
|
@@ -180,19 +180,7 @@ public struct ApplePayConfigDataResponse : Swift.Codable {
|
|
|
180
180
|
public init(from decoder: any Swift.Decoder) throws
|
|
181
181
|
}
|
|
182
182
|
@_inheritsConvenienceInitializers @objc public class ApplePayPaymentRequest : ObjectiveC.NSObject {
|
|
183
|
-
public
|
|
184
|
-
get
|
|
185
|
-
set
|
|
186
|
-
}
|
|
187
|
-
public var paymentAmount: Swift.Double {
|
|
188
|
-
get
|
|
189
|
-
set
|
|
190
|
-
}
|
|
191
|
-
public var appleRequest: PassKit.PKPaymentRequest {
|
|
192
|
-
get
|
|
193
|
-
set
|
|
194
|
-
}
|
|
195
|
-
@objc public func build(paymentItems: [PassKit.PKPaymentSummaryItem] = [], paymentAmount: Swift.Double, currencyCode: Swift.String = "USD")
|
|
183
|
+
@objc public func build(paymentItems: [PassKit.PKPaymentSummaryItem] = [], paymentAmount: Swift.Double, currencyCode: Swift.String = "USD", requiredBillingContactFields: Swift.Set<PassKit.PKContactField> = [], requiredShippingContactFields: Swift.Set<PassKit.PKContactField> = [])
|
|
196
184
|
@objc override dynamic public init()
|
|
197
185
|
@objc deinit
|
|
198
186
|
}
|
|
@@ -282,7 +270,7 @@ public enum PEKeyboardType {
|
|
|
282
270
|
@objc func paymentError(error: any Swift.Error)
|
|
283
271
|
@objc func paymentSheetDidMDismiss()
|
|
284
272
|
@objc func paymentTokenDidReturn(token: Swift.String, completion: @escaping (PEApplePayResult) -> Swift.Void)
|
|
285
|
-
@objc func paymentTokenNotAvailable()
|
|
273
|
+
@objc func paymentTokenNotAvailable(error: (any Swift.Error)?)
|
|
286
274
|
}
|
|
287
275
|
extension UIKit.UIView {
|
|
288
276
|
@_Concurrency.MainActor(unsafe) public func pinEdges(to view: UIKit.UIView)
|
|
@@ -180,19 +180,7 @@ public struct ApplePayConfigDataResponse : Swift.Codable {
|
|
|
180
180
|
public init(from decoder: any Swift.Decoder) throws
|
|
181
181
|
}
|
|
182
182
|
@_inheritsConvenienceInitializers @objc public class ApplePayPaymentRequest : ObjectiveC.NSObject {
|
|
183
|
-
public
|
|
184
|
-
get
|
|
185
|
-
set
|
|
186
|
-
}
|
|
187
|
-
public var paymentAmount: Swift.Double {
|
|
188
|
-
get
|
|
189
|
-
set
|
|
190
|
-
}
|
|
191
|
-
public var appleRequest: PassKit.PKPaymentRequest {
|
|
192
|
-
get
|
|
193
|
-
set
|
|
194
|
-
}
|
|
195
|
-
@objc public func build(paymentItems: [PassKit.PKPaymentSummaryItem] = [], paymentAmount: Swift.Double, currencyCode: Swift.String = "USD")
|
|
183
|
+
@objc public func build(paymentItems: [PassKit.PKPaymentSummaryItem] = [], paymentAmount: Swift.Double, currencyCode: Swift.String = "USD", requiredBillingContactFields: Swift.Set<PassKit.PKContactField> = [], requiredShippingContactFields: Swift.Set<PassKit.PKContactField> = [])
|
|
196
184
|
@objc override dynamic public init()
|
|
197
185
|
@objc deinit
|
|
198
186
|
}
|
|
@@ -282,7 +270,7 @@ public enum PEKeyboardType {
|
|
|
282
270
|
@objc func paymentError(error: any Swift.Error)
|
|
283
271
|
@objc func paymentSheetDidMDismiss()
|
|
284
272
|
@objc func paymentTokenDidReturn(token: Swift.String, completion: @escaping (PayEngineSDK.PEApplePayResult) -> Swift.Void)
|
|
285
|
-
@objc func paymentTokenNotAvailable()
|
|
273
|
+
@objc func paymentTokenNotAvailable(error: (any Swift.Error)?)
|
|
286
274
|
}
|
|
287
275
|
extension UIKit.UIView {
|
|
288
276
|
@_Concurrency.MainActor(unsafe) public func pinEdges(to view: UIKit.UIView)
|
package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/PayEngineSDK
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"object": {
|
|
3
|
+
"pins": [
|
|
4
|
+
{
|
|
5
|
+
"package": "CardIOSDK",
|
|
6
|
+
"repositoryURL": "https://github.com/verygoodsecurity/CardIOSDK-iOS.git",
|
|
7
|
+
"state": {
|
|
8
|
+
"branch": null,
|
|
9
|
+
"revision": "9f21bec2d2f12d14ffbe8305c44ceff9b60e35af",
|
|
10
|
+
"version": "5.5.7"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"package": "CardScan",
|
|
15
|
+
"repositoryURL": "https://github.com/getbouncer/cardscan-ios.git",
|
|
16
|
+
"state": {
|
|
17
|
+
"branch": null,
|
|
18
|
+
"revision": "84e7d1e7805675274edd85bc786b2dd1e4d864e0",
|
|
19
|
+
"version": "2.0.9"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"package": "VGSCollectSDK",
|
|
24
|
+
"repositoryURL": "https://github.com/verygoodsecurity/vgs-collect-ios.git",
|
|
25
|
+
"state": {
|
|
26
|
+
"branch": null,
|
|
27
|
+
"revision": "95540f515d9585744e80e7b8467d8a4f981ac4b5",
|
|
28
|
+
"version": "1.9.8"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"version": 1
|
|
34
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Bucket
|
|
3
|
+
uuid = "0B0AF432-C9B5-474C-9D82-5F6D58AF475E"
|
|
4
|
+
type = "1"
|
|
5
|
+
version = "2.0">
|
|
6
|
+
<Breakpoints>
|
|
7
|
+
<BreakpointProxy
|
|
8
|
+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
9
|
+
<BreakpointContent
|
|
10
|
+
uuid = "B796F2A1-7E46-4AB2-88C9-5277C3B1498A"
|
|
11
|
+
shouldBeEnabled = "No"
|
|
12
|
+
ignoreCount = "0"
|
|
13
|
+
continueAfterRunningActions = "No"
|
|
14
|
+
filePath = "Payengine.swift"
|
|
15
|
+
startingColumnNumber = "9223372036854775807"
|
|
16
|
+
endingColumnNumber = "9223372036854775807"
|
|
17
|
+
startingLineNumber = "282"
|
|
18
|
+
endingLineNumber = "282"
|
|
19
|
+
landmarkName = "VGSCardNumberFieldManager"
|
|
20
|
+
landmarkType = "3">
|
|
21
|
+
</BreakpointContent>
|
|
22
|
+
</BreakpointProxy>
|
|
23
|
+
</Breakpoints>
|
|
24
|
+
</Bucket>
|
package/ios/Payengine.xcworkspace/xcuserdata/tringuyen.xcuserdatad/UserInterfaceState.xcuserstate
ADDED
|
Binary file
|
package/ios/Pods/Pods.xcodeproj/xcuserdata/tringuyen.xcuserdatad/xcschemes/Pods-Payengine.xcscheme
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1300"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "33FCC41848D45F15D04CC50A1B0A2CB6"
|
|
18
|
+
BuildableName = "Pods_Payengine.framework"
|
|
19
|
+
BlueprintName = "Pods-Payengine"
|
|
20
|
+
ReferencedContainer = "container:Pods.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
</ProfileAction>
|
|
51
|
+
<AnalyzeAction
|
|
52
|
+
buildConfiguration = "Debug">
|
|
53
|
+
</AnalyzeAction>
|
|
54
|
+
<ArchiveAction
|
|
55
|
+
buildConfiguration = "Release"
|
|
56
|
+
revealArchiveInOrganizer = "YES">
|
|
57
|
+
</ArchiveAction>
|
|
58
|
+
</Scheme>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1300"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "56398578DCC88B03C6CBB8D32081A0F5"
|
|
18
|
+
BuildableName = "CardIcon.bundle"
|
|
19
|
+
BlueprintName = "VGSCollectSDK-CardIcon"
|
|
20
|
+
ReferencedContainer = "container:Pods.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
</ProfileAction>
|
|
51
|
+
<AnalyzeAction
|
|
52
|
+
buildConfiguration = "Debug">
|
|
53
|
+
</AnalyzeAction>
|
|
54
|
+
<ArchiveAction
|
|
55
|
+
buildConfiguration = "Release"
|
|
56
|
+
revealArchiveInOrganizer = "YES">
|
|
57
|
+
</ArchiveAction>
|
|
58
|
+
</Scheme>
|
package/ios/Pods/Pods.xcodeproj/xcuserdata/tringuyen.xcuserdatad/xcschemes/VGSCollectSDK.xcscheme
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1300"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "0199F6541197D647FCB6174FFE734F7B"
|
|
18
|
+
BuildableName = "VGSCollectSDK.framework"
|
|
19
|
+
BlueprintName = "VGSCollectSDK"
|
|
20
|
+
ReferencedContainer = "container:Pods.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
</ProfileAction>
|
|
51
|
+
<AnalyzeAction
|
|
52
|
+
buildConfiguration = "Debug">
|
|
53
|
+
</AnalyzeAction>
|
|
54
|
+
<ArchiveAction
|
|
55
|
+
buildConfiguration = "Release"
|
|
56
|
+
revealArchiveInOrganizer = "YES">
|
|
57
|
+
</ArchiveAction>
|
|
58
|
+
</Scheme>
|
package/ios/Pods/Pods.xcodeproj/xcuserdata/tringuyen.xcuserdatad/xcschemes/xcschememanagement.plist
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>Pods-Payengine.xcscheme</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>isShown</key>
|
|
10
|
+
<false/>
|
|
11
|
+
<key>orderHint</key>
|
|
12
|
+
<integer>0</integer>
|
|
13
|
+
</dict>
|
|
14
|
+
<key>VGSCollectSDK-CardIcon.xcscheme</key>
|
|
15
|
+
<dict>
|
|
16
|
+
<key>isShown</key>
|
|
17
|
+
<false/>
|
|
18
|
+
<key>orderHint</key>
|
|
19
|
+
<integer>2</integer>
|
|
20
|
+
</dict>
|
|
21
|
+
<key>VGSCollectSDK.xcscheme</key>
|
|
22
|
+
<dict>
|
|
23
|
+
<key>isShown</key>
|
|
24
|
+
<false/>
|
|
25
|
+
<key>orderHint</key>
|
|
26
|
+
<integer>1</integer>
|
|
27
|
+
</dict>
|
|
28
|
+
</dict>
|
|
29
|
+
<key>SuppressBuildableAutocreation</key>
|
|
30
|
+
<dict/>
|
|
31
|
+
</dict>
|
|
32
|
+
</plist>
|
|
@@ -62,6 +62,13 @@ class RNPEApplePayButton: UIView {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
extension RNPEApplePayButton: PEApplePayDelegate {
|
|
65
|
+
func paymentTokenNotAvailable(error: (Error)?) {
|
|
66
|
+
debugPrint("paymentTokenNotAvailable")
|
|
67
|
+
if self.onPmError != nil {
|
|
68
|
+
self.onPmError!(["error": error?.localizedDescription ?? "Payment token not available due to unexpected error"])
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
65
72
|
|
|
66
73
|
func paymentError(error: Error) {
|
|
67
74
|
debugPrint("payment error \(error)")
|
|
@@ -84,13 +91,6 @@ extension RNPEApplePayButton: PEApplePayDelegate {
|
|
|
84
91
|
completion(.success)
|
|
85
92
|
}
|
|
86
93
|
|
|
87
|
-
func paymentTokenNotAvailable() {
|
|
88
|
-
debugPrint("paymentTokenNotAvailable")
|
|
89
|
-
if self.onPmError != nil {
|
|
90
|
-
self.onPmError!(["error": "Payment token not available"])
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
94
|
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -13,20 +13,59 @@ public struct RNPEApplePayPaymentRequest: Codable {
|
|
|
13
13
|
var paymentAmount: Double
|
|
14
14
|
var currencyCode: String = "USD"
|
|
15
15
|
var paymentItems: [RNPEApplePayPaymentSummaryItem]
|
|
16
|
+
var requiredBillingContactFields: Set<RNPEContactField>? = []
|
|
17
|
+
var requiredShippingContactFields: Set<RNPEContactField>? = []
|
|
16
18
|
|
|
17
|
-
init(
|
|
19
|
+
init(
|
|
20
|
+
paymentAmount: Double,
|
|
21
|
+
currencyCode: String,
|
|
22
|
+
paymentItems: [RNPEApplePayPaymentSummaryItem],
|
|
23
|
+
requiredBillingContactFields: Set<RNPEContactField> = [],
|
|
24
|
+
requiredShippingContactFields: Set<RNPEContactField> = []
|
|
25
|
+
) {
|
|
18
26
|
self.paymentAmount = paymentAmount
|
|
19
27
|
self.currencyCode = currencyCode
|
|
20
28
|
self.paymentItems = paymentItems
|
|
29
|
+
self.requiredBillingContactFields = requiredBillingContactFields
|
|
30
|
+
self.requiredShippingContactFields = requiredShippingContactFields
|
|
21
31
|
}
|
|
22
32
|
|
|
23
33
|
func toNative() -> ApplePayPaymentRequest {
|
|
24
34
|
let request = ApplePayPaymentRequest()
|
|
25
|
-
request.build(
|
|
35
|
+
request.build(
|
|
36
|
+
paymentItems: self.paymentItems.map { $0.toNative() },
|
|
37
|
+
paymentAmount: self.paymentAmount,
|
|
38
|
+
currencyCode: self.currencyCode,
|
|
39
|
+
requiredBillingContactFields: Set(self.requiredBillingContactFields?.map { $0.toNative() } ?? []),
|
|
40
|
+
requiredShippingContactFields: Set(self.requiredShippingContactFields?.map { $0.toNative() } ?? [])
|
|
41
|
+
)
|
|
26
42
|
return request
|
|
27
43
|
}
|
|
28
44
|
}
|
|
29
45
|
|
|
46
|
+
public enum RNPEContactField: String, Codable {
|
|
47
|
+
case postalAddress = "postalAddress"
|
|
48
|
+
case emailAddress = "emailAddress"
|
|
49
|
+
case phoneNumber = "phoneNumber"
|
|
50
|
+
case name = "name"
|
|
51
|
+
case phoneticName = "phoneticName"
|
|
52
|
+
|
|
53
|
+
func toNative() -> PKContactField {
|
|
54
|
+
switch (self) {
|
|
55
|
+
case .postalAddress:
|
|
56
|
+
return PKContactField.postalAddress;
|
|
57
|
+
case .emailAddress:
|
|
58
|
+
return PKContactField.emailAddress;
|
|
59
|
+
case .phoneNumber:
|
|
60
|
+
return PKContactField.phoneNumber;
|
|
61
|
+
case .name:
|
|
62
|
+
return PKContactField.name;
|
|
63
|
+
case .phoneticName:
|
|
64
|
+
return PKContactField.phoneticName;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
30
69
|
public struct RNPEApplePayPaymentSummaryItem: Codable {
|
|
31
70
|
var amount: Double
|
|
32
71
|
var label: String
|
|
@@ -30,18 +30,20 @@ class RNPayEngineNative: NSObject {
|
|
|
30
30
|
|
|
31
31
|
@objc(createFraudMonitorSession:resolver:rejecter:)
|
|
32
32
|
func createFraudMonitorSession(merchantId: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
DispatchQueue.main.async {
|
|
34
|
+
do {
|
|
35
|
+
let payengine = try self.getInstance()
|
|
36
|
+
payengine.createFraudMonitorSession(merchantId) { fraudResult in
|
|
37
|
+
switch fraudResult {
|
|
38
|
+
case .success(let sessionId):
|
|
39
|
+
return resolve(sessionId)
|
|
40
|
+
case .failure(let error):
|
|
41
|
+
return reject("error", "Unable to obtain session ID", error)
|
|
42
|
+
}
|
|
41
43
|
}
|
|
44
|
+
} catch {
|
|
45
|
+
return reject("error", error.localizedDescription, error)
|
|
42
46
|
}
|
|
43
|
-
} catch {
|
|
44
|
-
return reject("error", error.localizedDescription, error)
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -45,7 +45,9 @@ const PEApplePayButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
45
45
|
width: '100%',
|
|
46
46
|
...props.style
|
|
47
47
|
},
|
|
48
|
-
paymentRequest: JSON.stringify(props.paymentRequest
|
|
48
|
+
paymentRequest: JSON.stringify({ ...props.paymentRequest,
|
|
49
|
+
...props.paymentRequest.platformOptions
|
|
50
|
+
}),
|
|
49
51
|
onPmError: pmError,
|
|
50
52
|
onPmTokenDidReturn: pmTokenDidReturn,
|
|
51
53
|
onPmSheetDidDismiss: pmSheetDidDismiss
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RNPEApplePayButton","requireNativeComponent","PEApplePayButton","React","forwardRef","props","ref","useImperativeHandle","pmError","event","onPaymentFailed","Error","nativeEvent","error","pmTokenDidReturn","onTokenDidReturn","token","pmSheetDidDismiss","onPaymentSheetDismissed","Platform","OS","height","width","style","JSON","stringify","paymentRequest"],"sources":["PEApplePayButton.tsx"],"sourcesContent":["\nimport * as React from 'react';\nimport { Platform, requireNativeComponent, Text, ViewProps } from 'react-native';\nimport type { PEPaymentRequest } from '../PEPaymentRequest';\n\n\nconst RNPEApplePayButton = requireNativeComponent<NativePEApplePayViewProps>('RNPEApplePayButton');\n\ntype NativePEApplePayEvent = {\n nativeEvent: {\n error?: string;\n token?: string\n };\n};\n\ninterface NativePEApplePayViewProps extends ViewProps {\n paymentRequest: string;\n onPmSheetDidDismiss: (event: NativePEApplePayEvent) => void;\n onPmTokenDidReturn: (event: NativePEApplePayEvent) => void;\n onPmError: (event: NativePEApplePayEvent) => void;\n}\n\nexport interface PEApplePayButtonProps extends ViewProps {\n paymentRequest: PEPaymentRequest;\n onTokenDidReturn?: (token: string) => void;\n onPaymentSheetDismissed?: () => void;\n onPaymentFailed?: (error: Error) => void;\n}\n\nexport interface PEApplePayButtonMethods {\n \n}\n\n\nexport const PEApplePayButton = React.forwardRef<\nPEApplePayButtonMethods,\n PEApplePayButtonProps\n>((props, ref) => {\n\n React.useImperativeHandle(ref, () => ({\n }));\n\n const pmError = (event: NativePEApplePayEvent) => {\n if (props.onPaymentFailed) {\n props.onPaymentFailed(new Error(event.nativeEvent.error));\n }\n };\n\n const pmTokenDidReturn = (event: NativePEApplePayEvent) => {\n if (props.onTokenDidReturn) {\n props.onTokenDidReturn(event.nativeEvent.token!);\n }\n };\n\n const pmSheetDidDismiss = () => {\n if (props.onPaymentSheetDismissed) {\n props.onPaymentSheetDismissed();\n }\n }\n\n if (Platform.OS !== 'ios') {\n return <Text>Apple Pay is not supported on this platform</Text>\n }\n \n return (\n <RNPEApplePayButton \n style={{ height: 32, width: '100%', ...(props.style as object) }} \n paymentRequest={JSON.stringify(props.paymentRequest)} \n onPmError={pmError} \n onPmTokenDidReturn={pmTokenDidReturn} \n onPmSheetDidDismiss={pmSheetDidDismiss} \n />\n );\n});\n"],"mappings":";;;;;;;AACA;;AACA;;;;;;AAIA,MAAMA,kBAAkB,GAAG,IAAAC,mCAAA,EAAkD,oBAAlD,CAA3B;AA4BO,MAAMC,gBAAgB,gBAAGC,KAAK,CAACC,UAAN,CAG9B,CAACC,KAAD,EAAQC,GAAR,KAAgB;EAEhBH,KAAK,CAACI,mBAAN,CAA0BD,GAA1B,EAA+B,OAAO,EAAP,CAA/B;;EAGA,MAAME,OAAO,GAAIC,KAAD,IAAkC;IAChD,IAAIJ,KAAK,CAACK,eAAV,EAA2B;MACzBL,KAAK,CAACK,eAAN,CAAsB,IAAIC,KAAJ,CAAUF,KAAK,CAACG,WAAN,CAAkBC,KAA5B,CAAtB;IACD;EACF,CAJD;;EAMA,MAAMC,gBAAgB,GAAIL,KAAD,IAAkC;IACzD,IAAIJ,KAAK,CAACU,gBAAV,EAA4B;MAC1BV,KAAK,CAACU,gBAAN,CAAuBN,KAAK,CAACG,WAAN,CAAkBI,KAAzC;IACD;EACF,CAJD;;EAMA,MAAMC,iBAAiB,GAAG,MAAM;IAC9B,IAAIZ,KAAK,CAACa,uBAAV,EAAmC;MACjCb,KAAK,CAACa,uBAAN;IACD;EACF,CAJD;;EAMA,IAAIC,qBAAA,CAASC,EAAT,KAAgB,KAApB,EAA2B;IACzB,oBAAO,oBAAC,iBAAD,sDAAP;EACD;;EAED,oBACE,oBAAC,kBAAD;IACE,KAAK,EAAE;MAAEC,MAAM,EAAE,EAAV;MAAcC,KAAK,EAAE,MAArB;MAA6B,GAAIjB,KAAK,CAACkB;IAAvC,CADT;IAEE,cAAc,EAAEC,IAAI,CAACC,SAAL,
|
|
1
|
+
{"version":3,"names":["RNPEApplePayButton","requireNativeComponent","PEApplePayButton","React","forwardRef","props","ref","useImperativeHandle","pmError","event","onPaymentFailed","Error","nativeEvent","error","pmTokenDidReturn","onTokenDidReturn","token","pmSheetDidDismiss","onPaymentSheetDismissed","Platform","OS","height","width","style","JSON","stringify","paymentRequest","platformOptions"],"sources":["PEApplePayButton.tsx"],"sourcesContent":["\nimport * as React from 'react';\nimport { Platform, requireNativeComponent, Text, ViewProps } from 'react-native';\nimport type { PEPaymentRequest } from '../PEPaymentRequest';\n\n\nconst RNPEApplePayButton = requireNativeComponent<NativePEApplePayViewProps>('RNPEApplePayButton');\n\ntype NativePEApplePayEvent = {\n nativeEvent: {\n error?: string;\n token?: string\n };\n};\n\ninterface NativePEApplePayViewProps extends ViewProps {\n paymentRequest: string;\n onPmSheetDidDismiss: (event: NativePEApplePayEvent) => void;\n onPmTokenDidReturn: (event: NativePEApplePayEvent) => void;\n onPmError: (event: NativePEApplePayEvent) => void;\n}\n\nexport interface PEApplePayButtonProps extends ViewProps {\n paymentRequest: PEPaymentRequest;\n onTokenDidReturn?: (token: string) => void;\n onPaymentSheetDismissed?: () => void;\n onPaymentFailed?: (error: Error) => void;\n}\n\nexport interface PEApplePayButtonMethods {\n \n}\n\n\nexport const PEApplePayButton = React.forwardRef<\nPEApplePayButtonMethods,\n PEApplePayButtonProps\n>((props, ref) => {\n\n React.useImperativeHandle(ref, () => ({\n }));\n\n const pmError = (event: NativePEApplePayEvent) => {\n if (props.onPaymentFailed) {\n props.onPaymentFailed(new Error(event.nativeEvent.error));\n }\n };\n\n const pmTokenDidReturn = (event: NativePEApplePayEvent) => {\n if (props.onTokenDidReturn) {\n props.onTokenDidReturn(event.nativeEvent.token!);\n }\n };\n\n const pmSheetDidDismiss = () => {\n if (props.onPaymentSheetDismissed) {\n props.onPaymentSheetDismissed();\n }\n }\n\n if (Platform.OS !== 'ios') {\n return <Text>Apple Pay is not supported on this platform</Text>\n }\n \n return (\n <RNPEApplePayButton \n style={{ height: 32, width: '100%', ...(props.style as object) }} \n paymentRequest={JSON.stringify({\n ...props.paymentRequest,\n ...props.paymentRequest.platformOptions\n })} \n onPmError={pmError} \n onPmTokenDidReturn={pmTokenDidReturn} \n onPmSheetDidDismiss={pmSheetDidDismiss} \n />\n );\n});\n"],"mappings":";;;;;;;AACA;;AACA;;;;;;AAIA,MAAMA,kBAAkB,GAAG,IAAAC,mCAAA,EAAkD,oBAAlD,CAA3B;AA4BO,MAAMC,gBAAgB,gBAAGC,KAAK,CAACC,UAAN,CAG9B,CAACC,KAAD,EAAQC,GAAR,KAAgB;EAEhBH,KAAK,CAACI,mBAAN,CAA0BD,GAA1B,EAA+B,OAAO,EAAP,CAA/B;;EAGA,MAAME,OAAO,GAAIC,KAAD,IAAkC;IAChD,IAAIJ,KAAK,CAACK,eAAV,EAA2B;MACzBL,KAAK,CAACK,eAAN,CAAsB,IAAIC,KAAJ,CAAUF,KAAK,CAACG,WAAN,CAAkBC,KAA5B,CAAtB;IACD;EACF,CAJD;;EAMA,MAAMC,gBAAgB,GAAIL,KAAD,IAAkC;IACzD,IAAIJ,KAAK,CAACU,gBAAV,EAA4B;MAC1BV,KAAK,CAACU,gBAAN,CAAuBN,KAAK,CAACG,WAAN,CAAkBI,KAAzC;IACD;EACF,CAJD;;EAMA,MAAMC,iBAAiB,GAAG,MAAM;IAC9B,IAAIZ,KAAK,CAACa,uBAAV,EAAmC;MACjCb,KAAK,CAACa,uBAAN;IACD;EACF,CAJD;;EAMA,IAAIC,qBAAA,CAASC,EAAT,KAAgB,KAApB,EAA2B;IACzB,oBAAO,oBAAC,iBAAD,sDAAP;EACD;;EAED,oBACE,oBAAC,kBAAD;IACE,KAAK,EAAE;MAAEC,MAAM,EAAE,EAAV;MAAcC,KAAK,EAAE,MAArB;MAA6B,GAAIjB,KAAK,CAACkB;IAAvC,CADT;IAEE,cAAc,EAAEC,IAAI,CAACC,SAAL,CAAe,EAC7B,GAAGpB,KAAK,CAACqB,cADoB;MAE7B,GAAGrB,KAAK,CAACqB,cAAN,CAAqBC;IAFK,CAAf,CAFlB;IAME,SAAS,EAAEnB,OANb;IAOE,kBAAkB,EAAEM,gBAPtB;IAQE,mBAAmB,EAAEG;EARvB,EADF;AAYD,CA1C+B,CAAzB"}
|
|
@@ -61,9 +61,12 @@ const PEGooglePayButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
61
61
|
height: 32,
|
|
62
62
|
width: '100%',
|
|
63
63
|
...props.style
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
} // amount={props.paymentRequest.paymentAmount}
|
|
65
|
+
// merchantId={props.paymentRequest.merchantId}
|
|
66
|
+
,
|
|
67
|
+
paymentRequest: JSON.stringify({ ...props.paymentRequest,
|
|
68
|
+
...props.paymentRequest.platformOptions
|
|
69
|
+
})
|
|
67
70
|
});
|
|
68
71
|
});
|
|
69
72
|
exports.PEGooglePayButton = PEGooglePayButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RNPEEventEmitter","NativeModules","RNPEGooglePayButton","requireNativeComponent","peEventEmitter","NativeEventEmitter","PEGooglePayButton","React","forwardRef","props","ref","useImperativeHandle","useEffect","listener1","addListener","args","token","console","log","onTokenDidReturn","listener2","error","onPaymentFailed","Error","listener3","onPaymentSheetDismissed","remove","Platform","OS","height","width","style","
|
|
1
|
+
{"version":3,"names":["RNPEEventEmitter","NativeModules","RNPEGooglePayButton","requireNativeComponent","peEventEmitter","NativeEventEmitter","PEGooglePayButton","React","forwardRef","props","ref","useImperativeHandle","useEffect","listener1","addListener","args","token","console","log","onTokenDidReturn","listener2","error","onPaymentFailed","Error","listener3","onPaymentSheetDismissed","remove","Platform","OS","height","width","style","JSON","stringify","paymentRequest","platformOptions"],"sources":["PEGooglePayButton.tsx"],"sourcesContent":["\nimport * as React from 'react';\nimport { NativeEventEmitter, NativeModules, Platform, requireNativeComponent, Text, ViewProps } from 'react-native';\nimport type { PEPaymentRequest } from '../PEPaymentRequest';\n\nconst { RNPEEventEmitter } = NativeModules;\n\nconst RNPEGooglePayButton = requireNativeComponent<NativePEGooglePayViewProps>('RNPEGooglePayButton');\n\ninterface NativePEGooglePayViewProps extends ViewProps {\n // amount: number;\n // merchantId: string;\n paymentRequest: string;\n}\n\nconst peEventEmitter = new NativeEventEmitter(RNPEEventEmitter);\n\nexport interface PEGooglePayButtonProps extends ViewProps {\n paymentRequest: PEPaymentRequest;\n onTokenDidReturn?: (token: string) => void;\n onPaymentSheetDismissed?: () => void;\n onPaymentFailed?: (error: Error) => void;\n}\n\nexport interface PEGooglePayButtonMethods {\n \n}\n\n\nexport const PEGooglePayButton = React.forwardRef<\n PEGooglePayButtonMethods,\n PEGooglePayButtonProps\n>((props, ref) => {\n\n React.useImperativeHandle(ref, () => ({\n }));\n\n React.useEffect(() => {\n const listener1 = peEventEmitter.addListener('onGooglePayRespond', args => {\n const { token } = args;\n console.log('ON token', token)\n props.onTokenDidReturn?.(token)\n });\n\n const listener2 = peEventEmitter.addListener('onGooglePayError', args => {\n const { error } = args;\n console.log('ON error', error)\n props.onPaymentFailed?.(new Error(error))\n });\n\n const listener3 = peEventEmitter.addListener('onGooglePayDismiss', () => {\n console.log('ON dismiss')\n props.onPaymentSheetDismissed?.()\n });\n\n return () => {\n listener1.remove();\n listener2.remove();\n listener3.remove();\n }\n }, []);\n\n if (Platform.OS !== 'android') {\n return <Text>Google Pay is not supported on this platform</Text>\n }\n \n return (\n <RNPEGooglePayButton \n style={{ height: 32, width: '100%', ...(props.style as object) }} \n // amount={props.paymentRequest.paymentAmount}\n // merchantId={props.paymentRequest.merchantId} \n paymentRequest={JSON.stringify({\n ...props.paymentRequest,\n ...props.paymentRequest.platformOptions\n })}\n />\n );\n});\n"],"mappings":";;;;;;;AACA;;AACA;;;;;;AAGA,MAAM;EAAEA;AAAF,IAAuBC,0BAA7B;AAEA,MAAMC,mBAAmB,GAAG,IAAAC,mCAAA,EAAmD,qBAAnD,CAA5B;AAQA,MAAMC,cAAc,GAAG,IAAIC,+BAAJ,CAAuBL,gBAAvB,CAAvB;AAcO,MAAMM,iBAAiB,gBAAGC,KAAK,CAACC,UAAN,CAG/B,CAACC,KAAD,EAAQC,GAAR,KAAgB;EAEhBH,KAAK,CAACI,mBAAN,CAA0BD,GAA1B,EAA+B,OAAO,EAAP,CAA/B;EAGAH,KAAK,CAACK,SAAN,CAAgB,MAAM;IACpB,MAAMC,SAAS,GAAGT,cAAc,CAACU,WAAf,CAA2B,oBAA3B,EAAiDC,IAAI,IAAI;MAAA;;MACzE,MAAM;QAAEC;MAAF,IAAYD,IAAlB;MACAE,OAAO,CAACC,GAAR,CAAY,UAAZ,EAAwBF,KAAxB;MACA,yBAAAP,KAAK,CAACU,gBAAN,qFAAAV,KAAK,EAAoBO,KAApB,CAAL;IACD,CAJiB,CAAlB;IAMA,MAAMI,SAAS,GAAGhB,cAAc,CAACU,WAAf,CAA2B,kBAA3B,EAA+CC,IAAI,IAAI;MAAA;;MACvE,MAAM;QAAEM;MAAF,IAAYN,IAAlB;MACAE,OAAO,CAACC,GAAR,CAAY,UAAZ,EAAwBG,KAAxB;MACA,yBAAAZ,KAAK,CAACa,eAAN,qFAAAb,KAAK,EAAmB,IAAIc,KAAJ,CAAUF,KAAV,CAAnB,CAAL;IACD,CAJiB,CAAlB;IAMA,MAAMG,SAAS,GAAGpB,cAAc,CAACU,WAAf,CAA2B,oBAA3B,EAAiD,MAAM;MAAA;;MACvEG,OAAO,CAACC,GAAR,CAAY,YAAZ;MACA,yBAAAT,KAAK,CAACgB,uBAAN,qFAAAhB,KAAK;IACN,CAHiB,CAAlB;IAKA,OAAO,MAAM;MACXI,SAAS,CAACa,MAAV;MACAN,SAAS,CAACM,MAAV;MACAF,SAAS,CAACE,MAAV;IACD,CAJD;EAKD,CAvBD,EAuBG,EAvBH;;EAyBA,IAAIC,qBAAA,CAASC,EAAT,KAAgB,SAApB,EAA+B;IAC7B,oBAAO,oBAAC,iBAAD,uDAAP;EACD;;EAED,oBACE,oBAAC,mBAAD;IACE,KAAK,EAAE;MAAEC,MAAM,EAAE,EAAV;MAAcC,KAAK,EAAE,MAArB;MAA6B,GAAIrB,KAAK,CAACsB;IAAvC,CADT,CAEE;IACA;IAHF;IAIE,cAAc,EAAEC,IAAI,CAACC,SAAL,CAAe,EAC7B,GAAGxB,KAAK,CAACyB,cADoB;MAE7B,GAAGzB,KAAK,CAACyB,cAAN,CAAqBC;IAFK,CAAf;EAJlB,EADF;AAWD,CAhDgC,CAA1B"}
|