Browse Source

Rename PaymentServices as PaymentMethods

pull/63/head
enisn 5 years ago
parent
commit
09a29f0973
  1. 2
      services/payment/src/EShopOnAbp.PaymentService.Application/PaymentMethods/DemoPaymentMethod.cs
  2. 2
      services/payment/src/EShopOnAbp.PaymentService.Application/PaymentMethods/IPaymentMethod.cs
  3. 4
      services/payment/src/EShopOnAbp.PaymentService.Application/PaymentMethods/PaymentMethodResolver.cs
  4. 4
      services/payment/src/EShopOnAbp.PaymentService.Application/PaymentMethods/PaypalMethod.cs
  5. 2
      services/payment/src/EShopOnAbp.PaymentService.Application/PaymentRequests/PaymentRequestAppService.cs
  6. 2
      services/payment/src/EShopOnAbp.PaymentService.Application/PaymentServiceApplicationModule.cs

2
services/payment/src/EShopOnAbp.PaymentService.Application/PaymentServices/DemoPaymentMethod.cs → services/payment/src/EShopOnAbp.PaymentService.Application/PaymentMethods/DemoPaymentMethod.cs

@ -3,7 +3,7 @@ using System.Threading.Tasks;
using EShopOnAbp.PaymentService.PaymentRequests;
using Volo.Abp.DependencyInjection;
namespace EShopOnAbp.PaymentService.PaymentServices;
namespace EShopOnAbp.PaymentService.PaymentMethods;
[ExposeServices(typeof(IPaymentMethod), typeof(DemoPaymentMethod))]
public class DemoPaymentMethod : IPaymentMethod

2
services/payment/src/EShopOnAbp.PaymentService.Application/PaymentServices/IPaymentMethod.cs → services/payment/src/EShopOnAbp.PaymentService.Application/PaymentMethods/IPaymentMethod.cs

@ -2,7 +2,7 @@
using EShopOnAbp.PaymentService.PaymentRequests;
using Volo.Abp.DependencyInjection;
namespace EShopOnAbp.PaymentService.PaymentServices;
namespace EShopOnAbp.PaymentService.PaymentMethods;
public interface IPaymentMethod : ITransientDependency
{

4
services/payment/src/EShopOnAbp.PaymentService.Application/PaymentServices/PaymentMethodResolver.cs → services/payment/src/EShopOnAbp.PaymentService.Application/PaymentMethods/PaymentMethodResolver.cs

@ -4,7 +4,7 @@ using System.Linq;
using Microsoft.Extensions.Logging;
using Volo.Abp.DependencyInjection;
namespace EShopOnAbp.PaymentService.PaymentServices;
namespace EShopOnAbp.PaymentService.PaymentMethods;
public class PaymentMethodResolver : ITransientDependency
{
@ -19,7 +19,7 @@ public class PaymentMethodResolver : ITransientDependency
public IPaymentMethod Resolve(int paymentTypeId)
{
IPaymentMethod paymentMethod = _paymentMethods.FirstOrDefault(q => q.PaymentTypeId == paymentTypeId);
var paymentMethod = _paymentMethods.FirstOrDefault(q => q.PaymentTypeId == paymentTypeId);
if (paymentMethod == null)
{
_logger.LogError($"Couldn't find Payment method with id:{paymentTypeId}");

4
services/payment/src/EShopOnAbp.PaymentService.Application/PaymentServices/PaypalMethod.cs → services/payment/src/EShopOnAbp.PaymentService.Application/PaymentMethods/PaypalMethod.cs

@ -8,7 +8,7 @@ using PayPalCheckoutSdk.Core;
using PayPalCheckoutSdk.Orders;
using Volo.Abp.DependencyInjection;
namespace EShopOnAbp.PaymentService.PaymentServices;
namespace EShopOnAbp.PaymentService.PaymentMethods;
[ExposeServices(typeof(IPaymentMethod), typeof(PaypalMethod))]
public class PaypalMethod : IPaymentMethod
@ -76,7 +76,7 @@ public class PaypalMethod : IPaymentMethod
request.Prefer("return=representation");
request.RequestBody(order);
Order result = (await _payPalHttpClient.Execute(request)).Result<Order>();
var result = (await _payPalHttpClient.Execute(request)).Result<Order>();
return new PaymentRequestStartResultDto
{

2
services/payment/src/EShopOnAbp.PaymentService.Application/PaymentRequests/PaymentRequestAppService.cs

@ -4,7 +4,7 @@ using PayPalCheckoutSdk.Orders;
using System;
using System.Linq;
using System.Threading.Tasks;
using EShopOnAbp.PaymentService.PaymentServices;
using EShopOnAbp.PaymentService.PaymentMethods;
namespace EShopOnAbp.PaymentService.PaymentRequests
{

2
services/payment/src/EShopOnAbp.PaymentService.Application/PaymentServiceApplicationModule.cs

@ -7,8 +7,8 @@ using EShopOnAbp.PaymentService.PayPal;
using PayPalCheckoutSdk.Core;
using System;
using EShopOnAbp.PaymentService.PaymentRequests;
using EShopOnAbp.PaymentService.PaymentServices;
using Microsoft.Extensions.Logging;
using EShopOnAbp.PaymentService.PaymentMethods;
namespace EShopOnAbp.PaymentService
{

Loading…
Cancel
Save