chromium/components/autofill/core/browser/payments/payments_requests/unmask_card_request.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/autofill/core/browser/payments/payments_requests/unmask_card_request.h"

#include <string_view>

#include "base/json/json_writer.h"
#include "base/strings/escape.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "components/autofill/core/browser/payments/autofill_error_dialog_context.h"
#include "components/autofill/core/browser/payments/autofill_payments_feature_availability.h"
#include "components/autofill/core/browser/payments/card_unmask_challenge_option.h"
#include "components/autofill/core/common/autofill_payments_features.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"

namespace autofill {
namespace payments {

namespace {
const char kUnmaskCardRequestPath[] =;

const char kUnmaskCardRequestFormat[] =;

const char kUnmaskCardRequestFormatWithCvc[] =;

const char kUnmaskCardRequestFormatWithOtp[] =;

constexpr size_t kDefaultOtpLength =;
constexpr size_t kDefaultCvcLength =;

// Parses the `defined_challenge_option` as a 3ds challenge option, and sets the
// appropriate fields in `parsed_challenge_option`.
void ParseAs3dsChallengeOption(
    const base::Value::Dict& defined_challenge_option,
    CardUnmaskChallengeOption& parsed_challenge_option) {}

// Parses the `defined_challenge_option` as an  OTP challenge option, and sets
// the appropriate fields in `parsed_challenge_option`.
void ParseAsOtpChallengeOption(
    const base::Value::Dict& defined_challenge_option,
    CardUnmaskChallengeOption& parsed_challenge_option,
    CardUnmaskChallengeOptionType otp_challenge_option_type) {}

// Parses the `defined_challenge_option` as a CVC challenge option, and sets the
// appropriate fields in `parsed_challenge_option`.
void ParseAsCvcChallengeOption(
    const base::Value::Dict& defined_challenge_option,
    CardUnmaskChallengeOption& parsed_challenge_option) {}

CardUnmaskChallengeOption ParseCardUnmaskChallengeOption(
    const base::Value::Dict& challenge_option) {}
}  // namespace

UnmaskCardRequest::UnmaskCardRequest(
    const PaymentsNetworkInterface::UnmaskRequestDetails& request_details,
    const bool full_sync_enabled,
    base::OnceCallback<
        void(PaymentsAutofillClient::PaymentsRpcResult,
             const PaymentsNetworkInterface::UnmaskResponseDetails&)> callback)
    :{}

UnmaskCardRequest::~UnmaskCardRequest() = default;

std::string UnmaskCardRequest::GetRequestUrlPath() {}

std::string UnmaskCardRequest::GetRequestContentType() {}

std::string UnmaskCardRequest::GetRequestContent() {}

void UnmaskCardRequest::ParseResponse(const base::Value::Dict& response) {}

bool UnmaskCardRequest::IsResponseComplete() {}

void UnmaskCardRequest::RespondToDelegate(
    PaymentsAutofillClient::PaymentsRpcResult result) {}

bool UnmaskCardRequest::IsRetryableFailure(const std::string& error_code) {}

std::string UnmaskCardRequest::GetHistogramName() const {}

std::optional<base::TimeDelta> UnmaskCardRequest::GetTimeout() const {}

bool UnmaskCardRequest::IsAllCardInformationValidIncludingDcvv() {}

bool UnmaskCardRequest::CanPerformVirtualCardAuth() {}

}  // namespace payments
}  // namespace autofill