Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

CreatePaymentTokenRequest.cs

using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using Nop.Plugin.Payments.PayPalCommerce.Services.Api.Models;

namespace Nop.Plugin.Payments.PayPalCommerce.Services.Api.PaymentTokens;

/// 
/// Represents the request to create a Payment Token from the given payment source and adds it to the Vault of the associated customer
/// 
public class CreatePaymentTokenRequest : IAuthorizedRequest
{
    #region Properties

    /// 
    /// Gets or sets the customer in merchant's or partner's system of records.
    /// 
    [JsonProperty(PropertyName = "customer")]
    public Payer Customer { get; set; }

    /// 
    /// Gets or sets the vaulted payment method details.
    /// 
    [JsonProperty(PropertyName = "payment_source")]
    public RecurringPaymentSource PaymentSource { get; set; }

    /// 
    /// Gets the request path
    /// 
    [JsonIgnore]
    public string Path => $"v3/vault/payment-tokens?";

    /// 
    /// Gets the request method
    /// 
    [JsonIgnore]
    public string Method => HttpMethods.Post;

    #endregion
}