diff --git a/MangoPay.SDK.Tests/ApiPayInsTest.cs b/MangoPay.SDK.Tests/ApiPayInsTest.cs index 60c30f6..c06ce03 100644 --- a/MangoPay.SDK.Tests/ApiPayInsTest.cs +++ b/MangoPay.SDK.Tests/ApiPayInsTest.cs @@ -523,6 +523,7 @@ public async Task Test_PayIns_Create_BancontactWeb() Assert.IsNotNull(fetched.Id); Assert.AreEqual(CultureCode.NL, fetched.Culture); Assert.AreEqual(false, fetched.Recurring); + Assert.AreEqual(PaymentFlow.APP, payIn.PaymentFlow); } catch (Exception ex) { diff --git a/MangoPay.SDK.Tests/BaseTest.cs b/MangoPay.SDK.Tests/BaseTest.cs index 7b92d6b..ef3b998 100644 --- a/MangoPay.SDK.Tests/BaseTest.cs +++ b/MangoPay.SDK.Tests/BaseTest.cs @@ -803,7 +803,8 @@ protected async Task GetPayInBancontactWebPost() null, null, false, - CultureCode.NL + CultureCode.NL, + PaymentFlow.APP ); return payIn; diff --git a/MangoPay.SDK/Core/Enumerations/PaymentFlow.cs b/MangoPay.SDK/Core/Enumerations/PaymentFlow.cs new file mode 100644 index 0000000..5057bc5 --- /dev/null +++ b/MangoPay.SDK/Core/Enumerations/PaymentFlow.cs @@ -0,0 +1,9 @@ + +namespace MangoPay.SDK.Core.Enumerations +{ + public enum PaymentFlow + { + WEB, + APP + } +} diff --git a/MangoPay.SDK/Entities/GET/PayInBancontactWebDTO.cs b/MangoPay.SDK/Entities/GET/PayInBancontactWebDTO.cs index 4dffb52..bb298d8 100644 --- a/MangoPay.SDK/Entities/GET/PayInBancontactWebDTO.cs +++ b/MangoPay.SDK/Entities/GET/PayInBancontactWebDTO.cs @@ -24,5 +24,9 @@ public class PayInBancontactWebDTO : PayInDTO /// Whether the Bancontact pay-ins are being made to be re-used in a recurring payment flow public bool? Recurring { get; set; } + + /// Payment flow (default WEB). + [JsonConverter(typeof(StringEnumConverter))] + public PaymentFlow? PaymentFlow { get; set; } } } diff --git a/MangoPay.SDK/Entities/POST/PayInBancontactWebPostDTO.cs b/MangoPay.SDK/Entities/POST/PayInBancontactWebPostDTO.cs index 362e487..efd6aab 100644 --- a/MangoPay.SDK/Entities/POST/PayInBancontactWebPostDTO.cs +++ b/MangoPay.SDK/Entities/POST/PayInBancontactWebPostDTO.cs @@ -7,7 +7,8 @@ namespace MangoPay.SDK.Entities.POST public class PayInBancontactWebPostDTO : EntityPostBase { public PayInBancontactWebPostDTO(string authorId, Money debitedFunds, Money fees, string creditedWalletId, - string returnUrl, string tag = null, string statementDescriptor = null, bool? recurring = null, CultureCode? culture = null) + string returnUrl, string tag = null, string statementDescriptor = null, bool? recurring = null, + CultureCode? culture = null, PaymentFlow? paymentFlow = null) { AuthorId = authorId; DebitedFunds = debitedFunds; @@ -18,6 +19,7 @@ public PayInBancontactWebPostDTO(string authorId, Money debitedFunds, Money fees Tag = tag; Recurring = recurring; Culture = culture; + PaymentFlow = paymentFlow; } /// Author identifier. @@ -44,5 +46,9 @@ public PayInBancontactWebPostDTO(string authorId, Money debitedFunds, Money fees /// Whether the Bancontact pay-ins are being made to be re-used in a recurring payment flow public bool? Recurring { get; set; } + + /// Payment flow (default WEB). + [JsonConverter(typeof(StringEnumConverter))] + public PaymentFlow? PaymentFlow { get; set; } } } \ No newline at end of file