Chromium Code Reviews| Index: ios/chrome/browser/payments/payment_request_coordinator.mm |
| diff --git a/ios/chrome/browser/payments/payment_request_coordinator.mm b/ios/chrome/browser/payments/payment_request_coordinator.mm |
| index 3290959b01859fee64ef3608d2719302726e50a3..8f2d9530d1d4dc68955ff9fd13a72fa0ff5d7cbf 100644 |
| --- a/ios/chrome/browser/payments/payment_request_coordinator.mm |
| +++ b/ios/chrome/browser/payments/payment_request_coordinator.mm |
| @@ -208,9 +208,16 @@ class FullCardRequester |
| CVC:(const base::string16&)cvc { |
| web::PaymentResponse paymentResponse; |
| + // If the merchant specified the card network as part of the "basic-card" |
| + // payment method, return "basic-card" as the method_name. Otherwise, return |
| + // the name of the network directly. |
| + std::string basic_card_type = |
| + autofill::data_util::GetPaymentRequestData(card.type()) |
| + .basic_card_payment_type; |
| paymentResponse.method_name = |
| - base::ASCIIToUTF16(autofill::data_util::GetPaymentRequestData(card.type()) |
| - .basic_card_payment_type); |
| + _paymentRequest->basic_card_specified_networks().count(basic_card_type) |
|
Moe
2017/04/06 20:51:03
nit: find() demonstrates the intent more clearly.
Mathieu
2017/04/06 21:04:41
Done.
|
| + ? base::ASCIIToUTF16("basic-card") |
| + : base::ASCIIToUTF16(basic_card_type); |
| paymentResponse.details = GetBasicCardResponseFromAutofillCreditCard( |
| card, cvc, _paymentRequest->billing_profiles(), |