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..009d9277b353e0c022a4048c46279985a77e473b 100644 |
| --- a/ios/chrome/browser/ui/payments/payment_request_coordinator.mm |
| +++ b/ios/chrome/browser/ui/payments/payment_request_coordinator.mm |
| @@ -220,8 +220,23 @@ class FullCardRequester |
| ? base::ASCIIToUTF16("basic-card") |
| : base::ASCIIToUTF16(basic_card_type); |
| + // Get the billing address |
| + autofill::AutofillProfile billing_address; |
|
Moe
2017/04/26 18:03:49
s/billing_address/billingAddress
sebsg
2017/04/26 18:28:26
Done.
|
| + |
| + // TODO(crbug.com/714768): Make sure the billing address is set and valid |
| + // before getting here. Once the bug is addressed, there will be no need to |
| + // copy the address, *billing_address_ptr can be used to get the basic card |
| + // response. |
| + if (!card.billing_address_id().empty()) { |
| + autofill::AutofillProfile* billing_address_ptr = |
| + autofill::PersonalDataManager::GetProfileFromProfilesByGUID( |
|
Moe
2017/04/26 18:03:49
s/billing_address_ptr/billingAddressPtr
sebsg
2017/04/26 18:28:26
Done.
|
| + 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()) { |