wallee-payment/csharp-sdk

AbstractTransactionPending.AllowedPaymentMethodBrands must be a List of type "long" instead type of Model "PaymentMethodBrand"

thornch opened this issue · 5 comments

In namespace "Wallee.Model" the partial class "AbstractTransactionPending" must be changed in order to creation of transaction with restriction in payment method brands.

For the restriction the field "AllowedPaymentMethodBrands" must contains a list of PaymentMethodBrandId - and this should be equal to AllowedPaymentMethodConfigurations as list of type "long"

Currently only a list of type "PaymentMethodBrand" is supported which generates an API error.

I have the same Issue when creating a new Transaction and allowing brands as follows:

var allBrands = new PaymentMethodBrandService(WalleeTestData.Configuration).All();

            var transactionCreate = new TransactionCreate(new List<LineItemCreate>() {lineItem1})
            {
                EnvironmentSelectionStrategy = environment,
                MerchantReference = orderNumber,
                Currency = "CHF",
                Language = "en-US",
                BillingAddress = GetTestAddress(),
                SuccessUrl = successUrl,
                FailedUrl = errorUrl,
                AllowedPaymentMethodBrands = p
            };

Upon sending the request, this exception is thrown.

Wallee.Client.ApiException
  HResult=0x80131500
  Message=Error calling Create: {"date":"2022-03-03T13:42:44.392Z","defaultMessage":"The request is invalid. The request content seems to contain data which we do not understand.","id":"XsbmUB_CfeY5VGHBrn2cLJFirNmetCmKVgDkhAbuZsg (2022-03-03T13:42:44.392Z)","message":"The request is invalid. The request content seems to contain data which we do not understand.","type":"DEVELOPER_ERROR"}
  Source=Wallee
  StackTrace:
   at Wallee.Service.TransactionService.CreateWithHttpInfo(Nullable`1 spaceId, TransactionCreate transaction)
   at Wallee.Service.TransactionService.Create(Nullable`1 spaceId, TransactionCreate transaction)
   ...

thank you @thornch and @peerjuettner for raising this, we have created a bug item based on your findings and will take a look at it internally

hello @sauliususoniswallee - any update on this issue? We are stuck waiting for a fix as we need this feature before we can go live with wallee.

Hi @peerjuettner, we have scheduled it in our next sprint which will start on March 23

Thank you for the update @wallee-deployment-user