Chromium Code Reviews| 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 f0e9e6d6f8b7d94acc91ed0a1c017eb57f0f314a..756fe4a8a4dd5acb9d138395c2aed854d0b51714 100644 |
| --- a/ios/chrome/browser/ui/payments/payment_request_coordinator.mm |
| +++ b/ios/chrome/browser/ui/payments/payment_request_coordinator.mm |
| @@ -220,8 +220,21 @@ class FullCardRequester |
| ? base::ASCIIToUTF16("basic-card") |
| : base::ASCIIToUTF16(basic_card_type); |
| + // Get the billing address |
| + autofill::AutofillProfile billing_address; |
|
Mathieu
2017/04/25 19:27:42
Can you add a comment that if crbug.com/714768 is
sebsg
2017/04/25 19:35:23
Done.
|
| + |
| + // TODO(crbug.com/714768): Make sure the billing address is set and valid |
| + // before getting here. |
| + if (!card.billing_address_id().empty()) { |
| + autofill::AutofillProfile* billing_address_ptr = |
| + autofill::PersonalDataManager::GetProfileFromProfilesByGUID( |
| + card.billing_address_id(), _paymentRequest->billing_profiles()); |
| + if (billing_address_ptr) |
| + billing_address = *billing_address_ptr; |
| + } |
| + |
| paymentResponse.details = GetBasicCardResponseFromAutofillCreditCard( |
| - card, cvc, _paymentRequest->billing_profiles(), |
| + card, cvc, billing_address, |
| GetApplicationContext()->GetApplicationLocale()); |
| if (_paymentRequest->request_shipping()) { |