Skip to content

Commit

Permalink
renamed PaymentMethodForm.swift to SavedPaymentMethodFormFactory, re-…
Browse files Browse the repository at this point in the history
…added Update payment method localized string, changed error message
  • Loading branch information
joyceqin-stripe committed Nov 21, 2024
1 parent bfac23c commit aee04e5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
A1AC7034E778F81B8758A653 /* OHHTTPStubsSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 20076FBD56C42E259EF62F2B /* OHHTTPStubsSwift */; };
A36949C52CE7D72300739E5D /* UpdatePaymentMethodViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A36949C42CE7D72300739E5D /* UpdatePaymentMethodViewModel.swift */; };
A3B2F2B22CEE689C00C0E88C /* TextFieldElement+USBankAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3B2F2B12CEE689C00C0E88C /* TextFieldElement+USBankAccount.swift */; };
A3B2F2B42CEE882D00C0E88C /* PaymentMethodForm.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3B2F2B32CEE882D00C0E88C /* PaymentMethodForm.swift */; };
A3B2F2B42CEE882D00C0E88C /* SavedPaymentMethodFormFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3B2F2B32CEE882D00C0E88C /* SavedPaymentMethodFormFactory.swift */; };
A4CD99B2032CBFA7F957B1B8 /* String+AutoComplete.swift in Sources */ = {isa = PBXBuildFile; fileRef = 982014B36F49D902CD04AF5C /* String+AutoComplete.swift */; };
A4FF52567582E9774AE13348 /* PaymentDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981F958E99945A0318D47BBF /* PaymentDetails.swift */; };
A59432E765A72CEE2C36E0EF /* PaymentSheetFormFactory+Card.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF41D601B198DC37337940C /* PaymentSheetFormFactory+Card.swift */; };
Expand Down Expand Up @@ -683,7 +683,7 @@
A36949C42CE7D72300739E5D /* UpdatePaymentMethodViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdatePaymentMethodViewModel.swift; sourceTree = "<group>"; };
A39F7EBA2E9E3CE55E7AADC9 /* STPFixtures+PaymentSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "STPFixtures+PaymentSheet.swift"; sourceTree = "<group>"; };
A3B2F2B12CEE689C00C0E88C /* TextFieldElement+USBankAccount.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TextFieldElement+USBankAccount.swift"; sourceTree = "<group>"; };
A3B2F2B32CEE882D00C0E88C /* PaymentMethodForm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentMethodForm.swift; sourceTree = "<group>"; };
A3B2F2B32CEE882D00C0E88C /* SavedPaymentMethodFormFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SavedPaymentMethodFormFactory.swift; sourceTree = "<group>"; };
A49D0A50ECFA7A4A5FC40878 /* ca-ES */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ca-ES"; path = "ca-ES.lproj/Localizable.strings"; sourceTree = "<group>"; };
A5012364ED0F2EEC6EC2AB52 /* PaymentMethodElementWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentMethodElementWrapper.swift; sourceTree = "<group>"; };
A5E8DD8761B4C52B143038C4 /* LinkInlineSignupElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkInlineSignupElement.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1184,7 +1184,7 @@
BBB56BACEB0ADD42882632CB /* SepaMandateViewController.swift */,
BF0E71D9DEA93036E4C87CEC /* UpdatePaymentMethodViewController.swift */,
A36949C42CE7D72300739E5D /* UpdatePaymentMethodViewModel.swift */,
A3B2F2B32CEE882D00C0E88C /* PaymentMethodForm.swift */,
A3B2F2B32CEE882D00C0E88C /* SavedPaymentMethodFormFactory.swift */,
);
path = ViewControllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -2220,7 +2220,7 @@
3147CED92CC1BF860067B5E4 /* LinkVerificationController.swift in Sources */,
3147CEDA2CC1BF860067B5E4 /* LinkVerificationViewController-PresentationController.swift in Sources */,
3147CEDB2CC1BF860067B5E4 /* LinkVerificationView.swift in Sources */,
A3B2F2B42CEE882D00C0E88C /* PaymentMethodForm.swift in Sources */,
A3B2F2B42CEE882D00C0E88C /* SavedPaymentMethodFormFactory.swift in Sources */,
3147CEDC2CC1BF860067B5E4 /* LinkVerificationView-Header.swift in Sources */,
3147CEDD2CC1BF860067B5E4 /* LinkVerificationView-LogoutView.swift in Sources */,
6103F2BC2BE45990002D67F8 /* SavedPaymentMethodManager.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ is not supported by the merchant */
the heading the screen itself. */
"Update card" = "Update card";

/* Accessibility label for a button that leads to a screen for updating a payment method. */
"Update payment method" = "Update payment method";

/* Two factor authentication screen heading */
"Use your saved info to check out faster" = "Use your saved info to check out faster";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ extension String.Localized {
)
}

static var update_payment_method: String {
STPLocalizedString(
"Update payment method",
"""
Accessibility label for a button that leads to a screen for updating a payment method.
"""
)
}

static var show_menu: String {
STPLocalizedString(
"Show menu",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SavedPaymentMethodFormFactory {
case .SEPADebit:
return sepaDebitSection
default:
fatalError("Updating payment method has not been implemented for \(viewModel.paymentMethod.type)")
fatalError("Cannot make payment method form for payment method type \(viewModel.paymentMethod.type).")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class CircularButton: UIControl {
accessibilityIdentifier = "CircularButton.Remove"
case .edit:
imageView.image = Image.icon_edit.makeImage(template: true)
accessibilityLabel = "Update payment method"
accessibilityLabel = String.Localized.update_payment_method
accessibilityIdentifier = "CircularButton.Edit"
}
}
Expand Down

0 comments on commit aee04e5

Please sign in to comment.