Webiant Logo Webiant Logo
  1. No results found.

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

CreateRefundRequest.cs

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

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

/// 
/// Represents the request to refund a captured payment
/// 
public class CreateRefundRequest : Refund, IAuthorizedRequest
{
    #region Properties

    /// 
    /// Gets or sets the ID of the webhook
    /// 
    [JsonIgnore]
    public string CaptureId { get; set; }

    /// 
    /// Gets or sets the additional payment instructions to be consider during refund payment processing. This object is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability.
    /// 
    [JsonProperty(PropertyName = "payment_instruction")]
    public PaymentInstruction PaymentInstruction { get; set; }

    /// 
    /// Gets the request path
    /// 
    [JsonIgnore]
    public string Path => $"v2/payments/captures/{Uri.EscapeDataString(CaptureId)}/refund?";

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

    #endregion
}