Skip to content

Commit

Permalink
Added missing mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Nesterov committed Apr 30, 2020
1 parent ff84969 commit 844209a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
public enum IntegrationPropertiesErrorCode
{
None = 0,
Success = 1,
Fail = 2,
PartnerConfigurationNotFound = 3,
PartnerConfigurationPropertyIsMissing = 4
Fail,
PartnerConfigurationNotFound,
PartnerConfigurationPropertyIsMissing,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public async Task<PayrexxIntegrationProperties> FetchPropertiesAsync(Guid partne
ApiBaseUrl = _apiBaseUrl,
InstanceName = instance,
ApiKey = apiKey,
ErrorCode = IntegrationPropertiesErrorCode.Success,
ErrorCode = IntegrationPropertiesErrorCode.None,
};
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/MAVN.Service.PayrexxIntegration/AutoMapperProfile.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
using AutoMapper;
using AutoMapper;
using MAVN.Service.PaymentIntegrationPlugin.Client.Models.Responses;
using MAVN.Service.PayrexxIntegration.Domain;

namespace MAVN.Service.PayrexxIntegration
{
public class AutoMapperProfile : Profile
{
public AutoMapperProfile()
{
// TODO - add mappings here...
CreateMap<IntegrationProperty, PaymentIntegrationProperty>(MemberList.Destination);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public async Task<CheckIntegrationErrorCode> CheckPaymentIntegrationAsync([FromB
{
var res = await client.Api.CheckSignatureAsync();
return res.Status == "success"
? CheckIntegrationErrorCode.Success
? CheckIntegrationErrorCode.None
: CheckIntegrationErrorCode.Fail;
}
catch (Exception e)
Expand Down Expand Up @@ -166,7 +166,7 @@ public async Task<PaymentStatusResponse> 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="LykkeBiz.Sdk" Version="1.0.0" />
<PackageReference Include="MAVN.Service.PaymentIntegrationPlugin.Client" Version="1.9.0" />
<PackageReference Include="MAVN.Service.PaymentIntegrationPlugin.Client" Version="1.11.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.14.0" />
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 844209a

Please sign in to comment.