Chromium Code Reviews
DescriptionSpecify 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
Committed: https://crrev.com/c498cd139a6791995261cd3ee3409a4caeb319f2
Cr-Commit-Position: refs/heads/master@{#401908}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Address comments #Messages
Total messages: 12 (6 generated)
|