Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: ios/chrome/browser/ui/payments/payment_request_coordinator.mm

Issue 2956453003: [Payment Request] Makes sure only complete credit cards can be selected (Closed)
Patch Set: Fixed unit test Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/payments/payment_request_coordinator.mm
diff --git a/ios/chrome/browser/ui/payments/payment_request_coordinator.mm b/ios/chrome/browser/ui/payments/payment_request_coordinator.mm
index b0ca87fb9546e6410ed836c9ec4037f4175102f5..87624db2d4d92a353f130e84917ad0539e9cd82a 100644
--- a/ios/chrome/browser/ui/payments/payment_request_coordinator.mm
+++ b/ios/chrome/browser/ui/payments/payment_request_coordinator.mm
@@ -12,6 +12,7 @@
#include "components/strings/grit/components_strings.h"
#include "ios/chrome/browser/application_context.h"
#include "ios/chrome/browser/payments/payment_request.h"
+#include "ios/chrome/browser/payments/payment_request_util.h"
#include "ios/chrome/browser/ui/payments/full_card_requester.h"
#include "ios/chrome/browser/ui/payments/payment_request_mediator.h"
#include "ui/base/l10n/l10n_util.h"
@@ -426,6 +427,8 @@ contactInfoSelectionCoordinator:(ContactInfoSelectionCoordinator*)coordinator
(PaymentMethodSelectionCoordinator*)coordinator
didSelectPaymentMethod:(autofill::CreditCard*)creditCard {
DCHECK(creditCard);
+ DCHECK(payment_request_util::IsCreditCardCompleteForPayment(
+ *creditCard, _paymentRequest->billing_profiles()));
_paymentRequest->set_selected_credit_card(creditCard);
[_viewController updatePaymentMethodSection];

Powered by Google App Engine
This is Rietveld 408576698