Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java

Issue 2561193002: [Merge M-56] Pass the full card number to merchant after unmask. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.payments; 5 package org.chromium.chrome.browser.payments;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.Handler; 8 import android.os.Handler;
9 import android.text.TextUtils; 9 import android.text.TextUtils;
10 import android.util.JsonWriter; 10 import android.util.JsonWriter;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Start to get the full card details. 88 // Start to get the full card details.
89 PersonalDataManager.getInstance().getFullCard(mWebContents, mCard, this) ; 89 PersonalDataManager.getInstance().getFullCard(mWebContents, mCard, this) ;
90 } 90 }
91 91
92 @Override 92 @Override
93 public void onFullCardDetails(CreditCard updatedCard, String cvc) { 93 public void onFullCardDetails(CreditCard updatedCard, String cvc) {
94 // Keep the cvc for after the normalization. 94 // Keep the cvc for after the normalization.
95 mSecurityCode = cvc; 95 mSecurityCode = cvc;
96 96
97 // The card number changes for unmasked cards.
98 assert updatedCard.getNumber().length() > 4;
99 mCard.setNumber(updatedCard.getNumber());
100
97 // Update the card's expiration date. 101 // Update the card's expiration date.
98 mCard.setMonth(updatedCard.getMonth()); 102 mCard.setMonth(updatedCard.getMonth());
99 mCard.setYear(updatedCard.getYear()); 103 mCard.setYear(updatedCard.getYear());
100 104
101 mIsWaitingForFullCardDetails = false; 105 mIsWaitingForFullCardDetails = false;
102 106
103 // Show the loading UI while the address gets normalized. 107 // Show the loading UI while the address gets normalized.
104 mCallback.loadingInstrumentDetails(); 108 mCallback.loadingInstrumentDetails();
105 109
106 // Wait for the billing address normalization before sending the instrum ent details. 110 // Wait for the billing address normalization before sending the instrum ent details.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 /** @return The credit card represented by this payment instrument. */ 288 /** @return The credit card represented by this payment instrument. */
285 public CreditCard getCard() { 289 public CreditCard getCard() {
286 return mCard; 290 return mCard;
287 } 291 }
288 292
289 /** @return The billing address associated with this credit card. */ 293 /** @return The billing address associated with this credit card. */
290 public AutofillProfile getBillingAddress() { 294 public AutofillProfile getBillingAddress() {
291 return mBillingAddress; 295 return mBillingAddress;
292 } 296 }
293 } 297 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698