New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 602663 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , All
Pri: 1
Type: Feature

Blocked on:
issue 624924

Blocking:
issue 621654
issue 603635



Sign in to add a comment

Billing address selection for autofill cards

Project Member Reported by rouslan@chromium.org, Apr 12 2016

Issue description

Billing address selection for autofill cards.
 
Labels: -Type-Bug -Pri-3 M-53 Pri-1 Type-Feature
Status: Started (was: Assigned)
Blocking: -587995 603635
Cc: ma...@chromium.org se...@chromium.org dfalcant...@chromium.org
Components: UI>Browser>Autofill
Labels: OS-All
TODO:

- Add "billing_address" (profile GUID) to the credit cards table.

- If the "CreditCard.billing_address" is null and "WalletMaskedCard.billing_address_id" is not null, then update the "billing_address" during sync.
Autofilling the billing address into a web form is lower priority for now: can be done after M-53. For M-53, we need to let PaymentRequest remember the billing address of a credit card, so that user does not have to select it every time.
Blocking: 621654
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b

commit 7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b
Author: rouslan <rouslan@chromium.org>
Date: Thu Jun 23 16:06:16 2016

Add billing address to credit cards.

Local credit cards now can have local profiles as their billing
addresses. This patch changes the autofill table version from 65 to 66.
The user can change the billing address in the Android credit card
settings UI. The billing address is necessary for PaymentRequest.

BUG= 602663 

Review-Url: https://codereview.chromium.org/2085133003
Cr-Commit-Position: refs/heads/master@{#401619}

[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/java/res/layout/autofill_credit_card_editor.xml
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillCreditCardEditor.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/java/strings/android_chrome_strings.grd
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/PersonalDataManagerTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDynamicShippingSingleAddressTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteContactDetailsTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteEmailTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompletePhoneTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/chrome/browser/autofill/android/personal_data_manager_android.cc
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/components/autofill/core/browser/credit_card.cc
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/components/autofill/core/browser/credit_card.h
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/components/autofill/core/browser/webdata/autofill_table.cc
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/components/autofill/core/browser/webdata/autofill_table.h
[add] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/components/test/data/web_database/version_65.sql
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/components/webdata/common/BUILD.gn
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/components/webdata/common/web_database.cc
[modify] https://crrev.com/7c7c0eb2a4166ab67530c1aa3ae3a465b9f1125b/components/webdata/common/web_database_migration_unittest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c498cd139a6791995261cd3ee3409a4caeb319f2

commit c498cd139a6791995261cd3ee3409a4caeb319f2
Author: rouslan <rouslan@chromium.org>
Date: Fri Jun 24 18:06:06 2016

Specify billing address for autofill cards in PaymentRequest.

If a credit card has a billing address, then the billing address will
also be passed to the merchant. The billing address specification
redirects to the shipping address specification, so that's the format
used in this patch.

https://w3c.github.io/webpayments-methods-card/#billingaddress
https://w3c.github.io/browser-payment-api/#paymentaddress-interface

The credit card information is an "instrument detail" that's unique to
each payment method. Therefore, it's passed through mojo as a JSON
string.

A credit card payment instrument detail now might look like this:

{
  "cardholderName": "First Last",
  "cardNumber": "4111111111111111",
  "expiryMonth": "12",
  "expiryYear": "2020",
  "cardSecurityCode": "123",
  "billingAddress": {
    "country": "US",
    "region": "CA",
    "city": "Mountain View",
    "dependentLocality": "",
    "addressLine: [
      "1600 Amphitheatre Pkwy"
    ],
    "postalCode": "94043",
    "sortingCode": "",
    "languageCode": "en-US",
    "organization": "Google",
    "recipient": "First Last",
    "careOf": "",
    "phone": "(650) 253-0000"
  }
}

Additional changes in this patch:
 - Add billing addresses to several integration tests, because the plan
   is to require billing addresses until merchants have a way to specify
   that they are optional.
 - Remove total amounts from several integration tests, because total
   amounts are no longer passed to merchants in response.

BUG= 602663 

Review-Url: https://codereview.chromium.org/2097713002
Cr-Commit-Position: refs/heads/master@{#401908}

[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentApp.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDynamicShippingSingleAddressTest.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailTest.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteContactDetailsTest.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteEmailTest.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompletePhoneTest.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneTest.java
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/test/data/android/payments/contact_details.js
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/test/data/android/payments/email.js
[modify] https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2/chrome/test/data/android/payments/phone.js

Screenshot_2016-06-29-10-21-53.png
59.6 KB View Download
Screenshot_2016-06-29-10-23-56.png
56.0 KB View Download
Screenshot_2016-06-29-10-23-24.png
65.5 KB View Download
Cc: hwi@chromium.org
hwi@, we are adding billing address to autofill settings on Android. This is separate from PaymentRequest UI, but alters the same data on disk. Can you check whether everything looks OK to you? If not, red lines or bullet points would be good. Thank you!

Comment 13 by zkoch@chromium.org, Jun 29 2016

First screenshot seems strange. I wonder if we should put the Google Payments and Clear button below the billing address.
How the UI looks like today without my changes.
Screenshot_20160629-125438.png
60.7 KB View Download
Screenshot_20160629-125411.png
89.2 KB View Download
Turns out the old "clear copy" buttons actually made more sense than the new UI. Going to fix that.
Screenshot_2016-06-29-13-11-35.png
52.8 KB View Download

Comment 16 by hwi@chromium.org, Jun 29 2016

rouslan@ - would this(screenshot) work? 

Note: I still think it's better to hide Billing address field when it's from Google Payments, on Autofill Settings. However, if there's reason to keep it and make it editable, X button next to the spinner with data (not null) might be a way to reset the spinner. The x icon asset is used in Omnibox when it's focused with something typed in.  
01-with-done-buttons.png
59.0 KB View Download
hwi@: I can do this, but the X button will likely be in M-54 and back-merged into M-53, if possible.
hwi@: We can think about making billing address un-editable in the future. Currently none of the server credit cards have a billing address. So it's more practical to keep the billing address dropdown editable at all times.

Comment 19 by hwi@chromium.org, Jun 29 2016

You got it on c15. 

- If we have to include Billing address, it looks better to be on the 2nd row (not the last row). 



03-without-done-buttons.png
60.7 KB View Download

Comment 20 by zkoch@chromium.org, Jun 29 2016

Agreed with #19.

I don't think we need the X. I'm not sure what value it provides?

Comment 21 by hwi@chromium.org, Jun 29 2016

c20: X - I think it's needed to clear the selected billing address. I don't feel strongly. So let's decide when we get onto M54 things. 

The attached are mocks to show what's in M53 and what's in M54+, as reference.


m54.png
59.1 KB View Download
m53.png
58.9 KB View Download
Screenshots for patch 3 in http://crrev.com/2109643003.
Screenshot_2016-06-29-18-00-57.png
56.5 KB View Download
Screenshot_2016-06-29-18-00-44.png
68.0 KB View Download
Screenshot_2016-06-29-18-01-06.png
66.2 KB View Download
Screenshot_2016-06-29-18-01-14.png
57.7 KB View Download

Comment 23 by zkoch@chromium.org, Jun 30 2016

There seem to be weird spacing issues. Is that intentional?
Exact spacing will be adjusted in follow up patches.
Keep in mind that this patch is for settings, not web payments. The two features use different UIs.
Blockedon: 624924
Project Member

Comment 27 by bugdroid1@chromium.org, Jun 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/31ca43a09d9883e80fdda6c504f6f2c10c5e2901

commit 31ca43a09d9883e80fdda6c504f6f2c10c5e2901
Author: rouslan <rouslan@chromium.org>
Date: Thu Jun 30 21:03:35 2016

Add billing address to masked server credit cards.

Autofill table:
  * Added billing_address_id column to masked_credit_card table.
  * Bumped version to 67.

Sync:
  * Do not overwrite user's preferred billing address for their server
    card when downloading masked credit cards from the server.

Personal data manager:
  * Added an UpdateServerCreditCardBillingAddress() method to support
    changes from settings.

Android autofill settings:
  * Let users change the billing address of their server credit card.
  * Local and server credit card settings have a common parent and
    re-use common UI elements.

BUG= 602663 

Review-Url: https://codereview.chromium.org/2109643003
Cr-Commit-Position: refs/heads/master@{#403282}

[add] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/res/layout/autofill_billing_address_dropdown.xml
[rename] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/res/layout/autofill_local_card_editor.xml
[delete] https://crrev.com/f486c19ecfeb8c3a1932aa18cbf2ff56339f05e7/chrome/android/java/res/layout/autofill_server_card_clear_copy_button.xml
[add] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/res/layout/autofill_server_card_editor.xml
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/res/values/dimens.xml
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/res/xml/autofill_preferences.xml
[delete] https://crrev.com/f486c19ecfeb8c3a1932aa18cbf2ff56339f05e7/chrome/android/java/res/xml/autofill_server_card_preferences.xml
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillCreditCardEditor.java
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillEditorBase.java
[add] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillLocalCardEditor.java
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPreferences.java
[add] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillServerCardEditor.java
[delete] https://crrev.com/f486c19ecfeb8c3a1932aa18cbf2ff56339f05e7/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillServerCardPreferences.java
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/android/java_sources.gni
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/browser/autofill/android/personal_data_manager_android.cc
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/chrome/browser/autofill/android/personal_data_manager_android.h
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/personal_data_manager.cc
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/personal_data_manager.h
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/webdata/autofill_table.cc
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/webdata/autofill_table.h
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/webdata/autofill_table_unittest.cc
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/webdata/autofill_webdata.h
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/webdata/autofill_webdata_service.cc
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/autofill/core/browser/webdata/autofill_webdata_service.h
[add] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/test/data/web_database/version_66.sql
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/webdata/common/BUILD.gn
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/webdata/common/web_database.cc
[modify] https://crrev.com/31ca43a09d9883e80fdda6c504f6f2c10c5e2901/components/webdata/common/web_database_migration_unittest.cc

Project Member

Comment 28 by sheriffbot@chromium.org, Jul 14 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Assigned (was: Started)
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments
Labels: -M-54
Status: Fixed (was: Assigned)

Sign in to add a comment