Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When you tap a saved PM, Apple Pay, or Link, PaymentSheet no longer s… #3438

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## X.X.X
### PaymentSheet
* [Fixed] When confirming a SetupIntent with Link, "Set up" will be shown as the confirm button text instead of "Pay".
* [Changed] Tapping a saved PM/Apple Pay/Link no longer sets it as the default; they are only set as the default after you successfully confirm.

### All
* Added a [Privacy Manifest](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,20 +497,6 @@ extension SavedPaymentOptionsViewController: UICollectionViewDataSource, UIColle
selectedViewModelIndex = indexPath.item
let viewModel = viewModels[indexPath.item]

switch viewModel {
case .add:
// Should have been handled in shouldSelectItemAt: before we got here!
assertionFailure()
case .applePay:
CustomerPaymentOption.setDefaultPaymentMethod(.applePay, forCustomer: configuration.customerID)
case .link:
CustomerPaymentOption.setDefaultPaymentMethod(.link, forCustomer: configuration.customerID)
case .saved(let paymentMethod):
CustomerPaymentOption.setDefaultPaymentMethod(
.stripeId(paymentMethod.stripeId),
forCustomer: configuration.customerID
)
}
updateMandateView()
cvcFormElement.clearTextFields()
updateFormElement()
Expand Down