diff --git a/src/MAVN.Service.PayrexxIntegration.Domain/Enums/IntegrationPropertiesErrorCode.cs b/src/MAVN.Service.PayrexxIntegration.Domain/Enums/IntegrationPropertiesErrorCode.cs index 13cc115..22466e3 100644 --- a/src/MAVN.Service.PayrexxIntegration.Domain/Enums/IntegrationPropertiesErrorCode.cs +++ b/src/MAVN.Service.PayrexxIntegration.Domain/Enums/IntegrationPropertiesErrorCode.cs @@ -3,9 +3,8 @@ public enum IntegrationPropertiesErrorCode { None = 0, - Success = 1, - Fail = 2, - PartnerConfigurationNotFound = 3, - PartnerConfigurationPropertyIsMissing = 4 + Fail, + PartnerConfigurationNotFound, + PartnerConfigurationPropertyIsMissing, } } diff --git a/src/MAVN.Service.PayrexxIntegration.DomainServices/PartnerIntegrationPropertiesService.cs b/src/MAVN.Service.PayrexxIntegration.DomainServices/PartnerIntegrationPropertiesService.cs index 15b48ac..274ff06 100644 --- a/src/MAVN.Service.PayrexxIntegration.DomainServices/PartnerIntegrationPropertiesService.cs +++ b/src/MAVN.Service.PayrexxIntegration.DomainServices/PartnerIntegrationPropertiesService.cs @@ -64,7 +64,7 @@ public async Task FetchPropertiesAsync(Guid partne ApiBaseUrl = _apiBaseUrl, InstanceName = instance, ApiKey = apiKey, - ErrorCode = IntegrationPropertiesErrorCode.Success, + ErrorCode = IntegrationPropertiesErrorCode.None, }; } } diff --git a/src/MAVN.Service.PayrexxIntegration/AutoMapperProfile.cs b/src/MAVN.Service.PayrexxIntegration/AutoMapperProfile.cs index f2eaf3a..cfa0a94 100644 --- a/src/MAVN.Service.PayrexxIntegration/AutoMapperProfile.cs +++ b/src/MAVN.Service.PayrexxIntegration/AutoMapperProfile.cs @@ -1,4 +1,6 @@ -using AutoMapper; +using AutoMapper; +using MAVN.Service.PaymentIntegrationPlugin.Client.Models.Responses; +using MAVN.Service.PayrexxIntegration.Domain; namespace MAVN.Service.PayrexxIntegration { @@ -6,7 +8,7 @@ public class AutoMapperProfile : Profile { public AutoMapperProfile() { - // TODO - add mappings here... + CreateMap(MemberList.Destination); } } } diff --git a/src/MAVN.Service.PayrexxIntegration/Controllers/PayrexxIntegrationController.cs b/src/MAVN.Service.PayrexxIntegration/Controllers/PayrexxIntegrationController.cs index bebb762..eb4c7e5 100644 --- a/src/MAVN.Service.PayrexxIntegration/Controllers/PayrexxIntegrationController.cs +++ b/src/MAVN.Service.PayrexxIntegration/Controllers/PayrexxIntegrationController.cs @@ -82,7 +82,7 @@ public async Task CheckPaymentIntegrationAsync([FromB { var res = await client.Api.CheckSignatureAsync(); return res.Status == "success" - ? CheckIntegrationErrorCode.Success + ? CheckIntegrationErrorCode.None : CheckIntegrationErrorCode.Fail; } catch (Exception e) @@ -166,7 +166,7 @@ public async Task CheckPaymentAsync(CheckPaymentRequest r { var paymentStatus = await client.Api.GetPaymentGatewayAsync(int.Parse(request.PaymentId)); - var result = new PaymentStatusResponse { ErrorCode = CheckIntegrationErrorCode.Success }; + var result = new PaymentStatusResponse { ErrorCode = CheckIntegrationErrorCode.None }; if (paymentStatus.Status != "success") { result.PaymentStatus = PaymentStatus.NotFound; diff --git a/src/MAVN.Service.PayrexxIntegration/MAVN.Service.PayrexxIntegration.csproj b/src/MAVN.Service.PayrexxIntegration/MAVN.Service.PayrexxIntegration.csproj index 2cc8fb1..3bc4ccd 100644 --- a/src/MAVN.Service.PayrexxIntegration/MAVN.Service.PayrexxIntegration.csproj +++ b/src/MAVN.Service.PayrexxIntegration/MAVN.Service.PayrexxIntegration.csproj @@ -24,7 +24,7 @@ - +