Chromium Code Reviews| Index: components/payments/core/basic_card_response.h |
| diff --git a/components/payments/core/basic_card_response.h b/components/payments/core/basic_card_response.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e4f53cb402ffb286de94e24f997097b90cd165fc |
| --- /dev/null |
| +++ b/components/payments/core/basic_card_response.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_PAYMENTS_CORE_BASIC_CARD_RESPONSE_H_ |
| +#define COMPONENTS_PAYMENTS_CORE_BASIC_CARD_RESPONSE_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/strings/string16.h" |
| +#include "components/payments/core/payment_address.h" |
| + |
| +namespace base { |
| +class DictionaryValue; |
| +} |
| + |
| +namespace web { |
| + |
| +// Contains the response from the PaymentRequest API when a user accepts |
| +// payment with a Basic Payment Card payment method. |
| +class BasicCardResponse { |
|
please use gerrit instead
2017/03/08 14:46:09
IMHO, this should be a struct, because it has no p
Mathieu
2017/03/08 18:04:25
Done.
|
| + public: |
| + BasicCardResponse(); |
| + BasicCardResponse(const BasicCardResponse& other); |
| + ~BasicCardResponse(); |
| + |
| + bool operator==(const BasicCardResponse& other) const; |
| + bool operator!=(const BasicCardResponse& other) const; |
| + |
| + // Populates |value| with the properties of this BasicCardResponse. |
| + std::unique_ptr<base::DictionaryValue> ToDictionaryValue() const; |
| + |
| + // The cardholder's name as it appears on the card. |
| + base::string16 cardholder_name; |
| + |
| + // The primary account number (PAN) for the payment card. |
| + base::string16 card_number; |
| + |
| + // A two-digit string for the expiry month of the card in the range 01 to 12. |
| + base::string16 expiry_month; |
| + |
| + // A two-digit string for the expiry year of the card in the range 00 to 99. |
| + base::string16 expiry_year; |
| + |
| + // A three or four digit string for the security code of the card (sometimes |
| + // known as the CVV, CVC, CVN, CVE or CID). |
| + base::string16 card_security_code; |
| + |
| + // The billing address information associated with the payment card. |
| + PaymentAddress billing_address; |
| +}; |
| + |
| +} // namespace web |
| + |
| +#endif // COMPONENTS_PAYMENTS_CORE_BASIC_CARD_RESPONSE_H_ |