@@ -4,7 +4,7 @@ import MessageUI
44import enum Hardware. CardReaderServiceError
55import enum Hardware. UnderlyingError
66
7- final class BuiltInCardReaderPaymentAlertsProvider : CardReaderTransactionAlertsProviding {
7+ final class TapToPayCardReaderPaymentAlertsProvider : CardReaderTransactionAlertsProviding {
88 var name : String = " "
99 var amount : String = " "
1010
@@ -24,10 +24,10 @@ final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsP
2424 onCancel: @escaping ( ) -> Void ) -> CardPresentPaymentsModalViewModel {
2525 name = title
2626 self . amount = amount
27- return CardPresentModalBuiltInFollowReaderInstructions ( name: name,
28- amount: amount,
29- transactionType: . collectPayment,
30- inputMethods: inputMethods)
27+ return CardPresentModalTapToPayFollowReaderInstructions ( name: name,
28+ amount: amount,
29+ transactionType: . collectPayment,
30+ inputMethods: inputMethods)
3131 }
3232
3333 func displayReaderMessage( message: String ) -> CardPresentPaymentsModalViewModel {
@@ -38,21 +38,21 @@ final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsP
3838
3939 func processingTransaction( title: String ) -> CardPresentPaymentsModalViewModel {
4040 name = title
41- return CardPresentModalBuiltInReaderProcessing ( name: name, amount: amount)
41+ return CardPresentModalTapToPayReaderProcessing ( name: name, amount: amount)
4242 }
4343
4444 func success( receiptState: CardReaderTransactionAlertReceiptState ) -> CardPresentPaymentsModalViewModel {
4545 switch receiptState {
4646 case let . paymentSuccessEmailSent( email, printReceiptAction, noReceiptAction) :
47- return CardPresentModalBuiltInSuccessEmailSent ( printReceipt: printReceiptAction,
48- noReceiptAction: noReceiptAction,
49- email: email)
47+ return CardPresentModalTapToPaySuccessEmailSent ( printReceipt: printReceiptAction,
48+ noReceiptAction: noReceiptAction,
49+ email: email)
5050 case let . promptToSendEmailReceipt( printReceiptAction, emailReceiptAction, noReceiptAction) :
51- return CardPresentModalBuiltInSuccess ( printReceipt: printReceiptAction,
52- emailReceipt: emailReceiptAction,
53- noReceiptAction: noReceiptAction)
51+ return CardPresentModalTapToPaySuccess ( printReceipt: printReceiptAction,
52+ emailReceipt: emailReceiptAction,
53+ noReceiptAction: noReceiptAction)
5454 case let . emailSendingNotSupported( printReceiptAction, noReceiptAction) :
55- return CardPresentModalBuiltInSuccessWithoutEmail ( printReceipt: printReceiptAction, noReceiptAction: noReceiptAction)
55+ return CardPresentModalTapToPaySuccessWithoutEmail ( printReceipt: printReceiptAction, noReceiptAction: noReceiptAction)
5656 }
5757 }
5858
@@ -62,25 +62,25 @@ final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsP
6262 dismissCompletion: @escaping ( ) -> Void ) -> CardPresentPaymentsModalViewModel {
6363 switch receiptState {
6464 case let . paymentSuccessEmailSent( email) :
65- return CardPresentModalErrorEmailSent ( errorDescription: builtInReaderDescription ( for: error) ,
65+ return CardPresentModalErrorEmailSent ( errorDescription: tapToPayReaderDescription ( for: error) ,
6666 transactionType: . collectPayment,
67- image: . builtInReaderError ,
67+ image: . tapToPayReaderError ,
6868 email: email,
6969 requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod ( error) ,
7070 tryAgainAction: tryAgain,
7171 dismissCompletion: dismissCompletion)
7272 case let . promptToSendEmailReceipt( emailReceiptAction) :
73- return CardPresentModalError ( errorDescription: builtInReaderDescription ( for: error) ,
73+ return CardPresentModalError ( errorDescription: tapToPayReaderDescription ( for: error) ,
7474 transactionType: . collectPayment,
75- image: . builtInReaderError ,
75+ image: . tapToPayReaderError ,
7676 requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod ( error) ,
7777 tryAgainAction: tryAgain,
7878 emailReceiptAction: emailReceiptAction,
7979 dismissCompletion: dismissCompletion)
8080 case . noEmailReceipt:
81- return CardPresentModalErrorWithoutEmail ( errorDescription: builtInReaderDescription ( for: error) ,
81+ return CardPresentModalErrorWithoutEmail ( errorDescription: tapToPayReaderDescription ( for: error) ,
8282 transactionType: . collectPayment,
83- image: . builtInReaderError ,
83+ image: . tapToPayReaderError ,
8484 requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod ( error) ,
8585 tryAgainAction: tryAgain,
8686 dismissCompletion: dismissCompletion)
@@ -93,22 +93,22 @@ final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsP
9393 switch receiptState {
9494 case let . paymentSuccessEmailSent( email) :
9595 CardPresentModalNonRetryableErrorEmailSent ( amount: amount,
96- errorDescription: builtInReaderDescription ( for: error) ,
97- image: . builtInReaderError ,
96+ errorDescription: tapToPayReaderDescription ( for: error) ,
97+ image: . tapToPayReaderError ,
9898 email: email,
9999 requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod ( error) ,
100100 onDismiss: dismissCompletion)
101101 case let . promptToSendEmailReceipt( emailReceiptAction) :
102102 CardPresentModalNonRetryableError ( amount: amount,
103- errorDescription: builtInReaderDescription ( for: error) ,
104- image: . builtInReaderError ,
103+ errorDescription: tapToPayReaderDescription ( for: error) ,
104+ image: . tapToPayReaderError ,
105105 requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod ( error) ,
106106 onDismiss: dismissCompletion,
107107 emailReceiptAction: emailReceiptAction)
108108 case . noEmailReceipt:
109109 CardPresentModalNonRetryableErrorWithoutEmail ( amount: amount,
110- errorDescription: builtInReaderDescription ( for: error) ,
111- image: . builtInReaderError ,
110+ errorDescription: tapToPayReaderDescription ( for: error) ,
111+ image: . tapToPayReaderError ,
112112 requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod ( error) ,
113113 onDismiss: dismissCompletion)
114114 }
@@ -119,8 +119,8 @@ final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsP
119119 }
120120}
121121
122- private extension BuiltInCardReaderPaymentAlertsProvider {
123- func builtInReaderDescription ( for error: Error ) -> String ? {
122+ private extension TapToPayCardReaderPaymentAlertsProvider {
123+ func tapToPayReaderDescription ( for error: Error ) -> String ? {
124124 if let error = error as? CardReaderServiceError {
125125 switch error {
126126 case . connection( let underlyingError) ,
0 commit comments