@@ -29,7 +29,8 @@ private extension InPersonPaymentsMenuViewController {
2929 rows = [
3030 . orderCardReader,
3131 . manageCardReader,
32- . bbposChipper2XBTManual
32+ . bbposChipper2XBTManual,
33+ . stripeM2Manual
3334 ]
3435 }
3536
@@ -55,7 +56,9 @@ private extension InPersonPaymentsMenuViewController {
5556 case let cell as LeftImageTableViewCell where row == . manageCardReader:
5657 configureManageCardReader ( cell: cell)
5758 case let cell as LeftImageTableViewCell where row == . bbposChipper2XBTManual:
58- configureBBPOSChipper2XBTManual ( cell: cell)
59+ configureChipper2XManual ( cell: cell)
60+ case let cell as LeftImageTableViewCell where row == . stripeM2Manual:
61+ configureStripeM2Manual ( cell: cell)
5962 default :
6063 fatalError ( )
6164 }
@@ -75,11 +78,18 @@ private extension InPersonPaymentsMenuViewController {
7578 cell. configure ( image: . creditCardIcon, text: Localization . manageCardReader)
7679 }
7780
78- func configureBBPOSChipper2XBTManual ( cell: LeftImageTableViewCell ) {
81+ func configureChipper2XManual ( cell: LeftImageTableViewCell ) {
7982 cell. imageView? . tintColor = . text
8083 cell. accessoryType = . disclosureIndicator
8184 cell. selectionStyle = . default
82- cell. configure ( image: . cardReaderManualIcon, text: Localization . cardReaderManual)
85+ cell. configure ( image: . cardReaderManualIcon, text: Localization . chipperCardReaderManual)
86+ }
87+
88+ func configureStripeM2Manual( cell: LeftImageTableViewCell ) {
89+ cell. imageView? . tintColor = . text
90+ cell. accessoryType = . disclosureIndicator
91+ cell. selectionStyle = . default
92+ cell. configure ( image: . cardReaderManualIcon, text: Localization . stripeM2CardReaderManual)
8393 }
8494}
8595
@@ -110,7 +120,11 @@ extension InPersonPaymentsMenuViewController {
110120 }
111121
112122 func bbposChipper2XBTManualWasPressed( ) {
113- WebviewHelper . launch ( Constants . bbposChipper2XBTManualURL, with: self )
123+ WebviewHelper . launch ( Constants . bbposChipper2XBTManualURL, with: self )
124+ }
125+
126+ func stripeM2ManualWasPressed( ) {
127+ WebviewHelper . launch ( Constants . stripeM2ManualURL, with: self )
114128 }
115129}
116130
@@ -147,6 +161,8 @@ extension InPersonPaymentsMenuViewController {
147161 manageCardReaderWasPressed ( )
148162 case . bbposChipper2XBTManual:
149163 bbposChipper2XBTManualWasPressed ( )
164+ case . stripeM2Manual:
165+ stripeM2ManualWasPressed ( )
150166 }
151167 }
152168}
@@ -165,9 +181,14 @@ private extension InPersonPaymentsMenuViewController {
165181 comment: " Navigates to Card Reader management screen "
166182 )
167183
168- static let cardReaderManual = NSLocalizedString (
169- " Card reader manual " ,
170- comment: " Navigates to Card Reader manual "
184+ static let chipperCardReaderManual = NSLocalizedString (
185+ " Chipper 2X card reader manual " ,
186+ comment: " Navigates to Chipper Card Reader manual "
187+ )
188+
189+ static let stripeM2CardReaderManual = NSLocalizedString (
190+ " Stripe M2 card reader manual " ,
191+ comment: " Navigates to Stripe M2 Card Reader manual "
171192 )
172193 }
173194}
@@ -176,16 +197,10 @@ private enum Row: CaseIterable {
176197 case orderCardReader
177198 case manageCardReader
178199 case bbposChipper2XBTManual
200+ case stripeM2Manual
179201
180202 var type : UITableViewCell . Type {
181- switch self {
182- case . orderCardReader:
183- return LeftImageTableViewCell . self
184- case . manageCardReader:
185- return LeftImageTableViewCell . self
186- case . bbposChipper2XBTManual:
187- return LeftImageTableViewCell . self
188- }
203+ LeftImageTableViewCell . self
189204 }
190205
191206 var reuseIdentifier : String {
@@ -194,8 +209,9 @@ private enum Row: CaseIterable {
194209}
195210
196211private enum Constants {
197- static let woocommercePurchaseCardReaderURL = URL ( string: " https://woocommerce.com/in-person-payments / " ) !
212+ static let woocommercePurchaseCardReaderURL = URL ( string: " https://woocommerce.com/products/m2-card-reader / " ) !
198213 static let bbposChipper2XBTManualURL = URL ( string: " https://developer.bbpos.com/quick_start_guide/Chipper%202X%20BT%20Quick%20Start%20Guide.pdf " ) !
214+ static let stripeM2ManualURL = URL ( string: " https://stripe.com/files/docs/terminal/m2_product_sheet.pdf " ) !
199215}
200216
201217// MARK: - SwiftUI compatibility
0 commit comments