Skip to content

Commit

Permalink
feat(identity): remove from payment package
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlabo committed Oct 14, 2023
1 parent b6b267c commit 3671de9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
11 changes: 0 additions & 11 deletions packages/payment/ios/Plugin/StripePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ import StripeApplePay
@objc(StripePlugin)
public class StripePlugin: CAPPlugin {
private let paymentSheetExecutor = PaymentSheetExecutor()
private let identityVerificationSheetExecutor = IdentityVerificationSheetExecutor()
private let paymentFlowExecutor = PaymentFlowExecutor()
private let applePayExecutor = ApplePayExecutor()

@objc func initialize(_ call: CAPPluginCall) {
self.paymentSheetExecutor.plugin = self
self.identityVerificationSheetExecutor.plugin = self
self.paymentFlowExecutor.plugin = self
self.applePayExecutor.plugin = self

Expand All @@ -38,7 +36,6 @@ public class StripePlugin: CAPPlugin {

@objc func handleURLCallback(_ call: CAPPluginCall) {
self.paymentSheetExecutor.plugin = self
self.identityVerificationSheetExecutor.plugin = self
self.paymentFlowExecutor.plugin = self
self.applePayExecutor.plugin = self

Expand Down Expand Up @@ -69,14 +66,6 @@ public class StripePlugin: CAPPlugin {
self.paymentSheetExecutor.presentPaymentSheet(call)
}

@objc func createIdentityVerificationSheet(_ call: CAPPluginCall) {
self.identityVerificationSheetExecutor.createIdentityVerificationSheet(call)
}

@objc func presentIdentityVerificationSheet(_ call: CAPPluginCall) {
self.identityVerificationSheetExecutor.presentIdentityVerificationSheet(call)
}

@objc func createPaymentFlow(_ call: CAPPluginCall) {
self.paymentFlowExecutor.createPaymentFlow(call)
}
Expand Down
6 changes: 5 additions & 1 deletion packages/terminal/ios/Plugin/StripeTerminalPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ public class StripeTerminalPlugin: CAPPlugin {
}

@objc func discoverReaders(_ call: CAPPluginCall) {
self.implementation.discoverReaders(call)
do {
try self.implementation.discoverReaders(call)
} catch {
call.reject("discoverReaders throw error.")
}
}

@objc func cancelDiscoverReaders(_ call: CAPPluginCall) {
Expand Down

0 comments on commit 3671de9

Please sign in to comment.