Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new params #224

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MangoPay.SDK.Tests/BaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ protected async Task<PayInCardDirectDTO> GetNewPayInCardDirectWithBilling(string
var payIn = await GetPayInCardDirectPost(userId, idempotencyKey);
payIn.Billing = billing;

payIn.PaymentCategory = "ECommerce";

return await this.Api.PayIns.CreateCardDirectAsync(payIn);
}

Expand Down
7 changes: 7 additions & 0 deletions MangoPay.SDK/Entities/GET/CardPreAuthorizationDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,12 @@ public class CardPreAuthorizationDTO : EntityBase
public string Applied3DSVersion { get; set; }

public CardInfo CardInfo { get; set; }

/// <summary>
/// The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments:
/// ECommerce – Payment received online.
/// TelephoneOrder – Payment received via mail order or telephone order (MOTO).
/// </summary>
public string PaymentCategory { get; set; }
}
}
7 changes: 7 additions & 0 deletions MangoPay.SDK/Entities/GET/CardValidationDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,12 @@ public class CardValidationDTO : EntityBase
/// <summary>Secure mode.</summary>
[JsonConverter(typeof(StringEnumConverter))]
public SecureMode? SecureMode { get; set; }

/// <summary>
/// The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments:
/// ECommerce – Payment received online.
/// TelephoneOrder – Payment received via mail order or telephone order (MOTO).
/// </summary>
public string PaymentCategory { get; set; }
}
}
7 changes: 7 additions & 0 deletions MangoPay.SDK/Entities/GET/PayInCardDirectDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,12 @@ public class PayInCardDirectDTO : PayInDTO
public string IpAddress { get; set; }

public CardInfo CardInfo { get; set; }

/// <summary>
/// The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments:
/// ECommerce – Payment received online.
/// TelephoneOrder – Payment received via mail order or telephone order (MOTO).
/// </summary>
public string PaymentCategory { get; set; }
}
}
6 changes: 6 additions & 0 deletions MangoPay.SDK/Entities/GET/RefundDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,11 @@ public class RefundDTO : EntityBase
public RefundReason RefundReason { get; set; }

public string Reference { get; set; }

/// <summary>
/// Custom description to appear on the user’s bank statement along with the platform name.
/// Note that a particular bank may show more or less information.
/// </summary>
public string StatementDescriptor { get; set; }
}
}
11 changes: 10 additions & 1 deletion MangoPay.SDK/Entities/POST/CardPreAuthorizationPostDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ namespace MangoPay.SDK.Entities.POST
/// <summary>Card pre-authorization POST entity.</summary>
public class CardPreAuthorizationPostDTO : EntityPostBase
{
public CardPreAuthorizationPostDTO(string authorId, Money debitedFunds, SecureMode secureMode, string cardId, string secureModeReturnURL, string statementDescriptor = null)
public CardPreAuthorizationPostDTO(string authorId, Money debitedFunds, SecureMode secureMode, string cardId,
string secureModeReturnURL, string statementDescriptor = null, string paymentCategory = null)
{
AuthorId = authorId;
DebitedFunds = debitedFunds;
SecureMode = secureMode;
CardId = cardId;
SecureModeReturnURL = secureModeReturnURL;
StatementDescriptor = statementDescriptor;
PaymentCategory = paymentCategory;
}

/// <summary>Author identifier.</summary>
Expand Down Expand Up @@ -60,5 +62,12 @@ public CardPreAuthorizationPostDTO(string authorId, Money debitedFunds, SecureMo
public string IpAddress { get; set; }

public string Requested3DSVersion { get; set; }

/// <summary>
/// The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments:
/// ECommerce – Payment received online.
/// TelephoneOrder – Payment received via mail order or telephone order (MOTO).
/// </summary>
public string PaymentCategory { get; set; }
}
}
10 changes: 9 additions & 1 deletion MangoPay.SDK/Entities/POST/CardValidationPostDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ namespace MangoPay.SDK.Entities.POST
public class CardValidationPostDTO: EntityPostBase
{
public CardValidationPostDTO(string authorId, string secureModeReturnUrl, string ipAddress, BrowserInfo browserInfo,
string tag = null, SecureMode? secureMode = null)
string tag = null, SecureMode? secureMode = null, string paymentCategory = null)
{
AuthorId = authorId;
SecureModeReturnUrl = secureModeReturnUrl;
IpAddress = ipAddress;
BrowserInfo = browserInfo;
Tag = tag;
SecureMode = secureMode;
PaymentCategory = paymentCategory;
}

/// <summary> The unique identifier of the user at the source of the transaction.
Expand All @@ -33,5 +34,12 @@ public CardValidationPostDTO(string authorId, string secureModeReturnUrl, string
/// <summary>Secure mode.</summary>
[JsonConverter(typeof(StringEnumConverter))]
public SecureMode? SecureMode { get; set; }

/// <summary>
/// The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments:
/// ECommerce – Payment received online.
/// TelephoneOrder – Payment received via mail order or telephone order (MOTO).
/// </summary>
public string PaymentCategory { get; set; }
}
}
12 changes: 11 additions & 1 deletion MangoPay.SDK/Entities/POST/PayInCardDirectPostDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ namespace MangoPay.SDK.Entities.POST
/// <summary>PayIn card direct POST entity.</summary>
public class PayInCardDirectPostDTO : EntityPostBase
{
public PayInCardDirectPostDTO(string authorId, string creditedUserId, Money debitedFunds, Money fees, string creditedWalletId, string secureModeReturnURL, string cardId, string statementDescriptor = null, Billing billing = null, BrowserInfo bInfo = null)
public PayInCardDirectPostDTO(string authorId, string creditedUserId, Money debitedFunds, Money fees,
string creditedWalletId, string secureModeReturnURL, string cardId, string statementDescriptor = null,
Billing billing = null, BrowserInfo bInfo = null, string paymentCategory = null)
{
AuthorId = authorId;
CreditedUserId = creditedUserId;
Expand All @@ -21,6 +23,7 @@ public PayInCardDirectPostDTO(string authorId, string creditedUserId, Money debi
StatementDescriptor = statementDescriptor;
Billing = Billing;
BrowserInfo = bInfo;
PaymentCategory = paymentCategory;
}

/// <summary>Author identifier.</summary>
Expand Down Expand Up @@ -70,5 +73,12 @@ public PayInCardDirectPostDTO(string authorId, string creditedUserId, Money debi
public string IpAddress { get; set; }

public string Requested3DSVersion { get; set; }

/// <summary>
/// The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments:
/// ECommerce – Payment received online.
/// TelephoneOrder – Payment received via mail order or telephone order (MOTO).
/// </summary>
public string PaymentCategory { get; set; }
}
}
10 changes: 9 additions & 1 deletion MangoPay.SDK/Entities/POST/RefundPayInPostDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ public RefundPayInPostDTO(string authorId)
AuthorId = authorId;
}

public RefundPayInPostDTO(string authorId, Money fees, Money debitedFunds, string reference = null)
public RefundPayInPostDTO(string authorId, Money fees, Money debitedFunds, string reference = null,
string statementDescriptor = null)
{
AuthorId = authorId;
Fees = fees;
DebitedFunds = debitedFunds;
Reference = reference;
StatementDescriptor = statementDescriptor;
}

/// <summary>Author identifier.</summary>
Expand All @@ -32,5 +34,11 @@ public RefundPayInPostDTO(string authorId, Money fees, Money debitedFunds, strin
public Money Fees { get; set; }

public string Reference { get; set; }

/// <summary>
/// Custom description to appear on the user’s bank statement along with the platform name.
/// Note that a particular bank may show more or less information.
/// </summary>
public string StatementDescriptor { get; set; }
}
}
Loading