From acebab9be1a827c0a06f69f7db5a80309f1a43ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Necipo=C4=9Flu?= Date: Wed, 20 Oct 2021 16:20:47 +0300 Subject: [PATCH 1/2] Refactoring on Payment module --- .../src/Payment.Domain/PaymentRequests/PaymentRequest.cs | 1 + .../PaymentRequests/PaymentRequestController.cs | 4 ++-- .../src/Payment.Web/Pages/Payment/PostCheckout.cshtml.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/payment/src/Payment.Domain/PaymentRequests/PaymentRequest.cs b/modules/payment/src/Payment.Domain/PaymentRequests/PaymentRequest.cs index 086639b..fa0090f 100644 --- a/modules/payment/src/Payment.Domain/PaymentRequests/PaymentRequest.cs +++ b/modules/payment/src/Payment.Domain/PaymentRequests/PaymentRequest.cs @@ -25,6 +25,7 @@ namespace Payment.PaymentRequests public bool IsDeleted { get; set; } + [CanBeNull] public string FailReason { get; protected set; } private PaymentRequest() diff --git a/modules/payment/src/Payment.HttpApi/PaymentRequests/PaymentRequestController.cs b/modules/payment/src/Payment.HttpApi/PaymentRequests/PaymentRequestController.cs index ebf45b1..3ba9d76 100644 --- a/modules/payment/src/Payment.HttpApi/PaymentRequests/PaymentRequestController.cs +++ b/modules/payment/src/Payment.HttpApi/PaymentRequests/PaymentRequestController.cs @@ -5,7 +5,7 @@ using Volo.Abp; namespace Payment.PaymentRequests { - [RemoteService(Name = PaymentRemoteServiceConsts.RemoteServiceName)] + [RemoteService(Name = PaymentRemoteServiceConsts.RemoteServiceName)] [Area("payment")] [Route("api/payment/requests")] public class PaymentRequestController : PaymentController, IPaymentRequestAppService @@ -44,4 +44,4 @@ namespace Payment.PaymentRequests return PaymentRequestAppService.StartPaymentAsync(input); } } -} +} \ No newline at end of file diff --git a/modules/payment/src/Payment.Web/Pages/Payment/PostCheckout.cshtml.cs b/modules/payment/src/Payment.Web/Pages/Payment/PostCheckout.cshtml.cs index e198f8c..26e5c54 100644 --- a/modules/payment/src/Payment.Web/Pages/Payment/PostCheckout.cshtml.cs +++ b/modules/payment/src/Payment.Web/Pages/Payment/PostCheckout.cshtml.cs @@ -39,7 +39,7 @@ namespace Payment.Web.Pages.Payment PaymentRequest = await _paymentRequestAppService.CompleteAsync(Token); - GoBackLink = _paymentUrlBuilder.BuildReturnUrl(PaymentRequest.Id).AbsoluteUri; + GoBackLink = _paymentUrlBuilder.BuildCheckoutUrl(PaymentRequest.Id).AbsoluteUri; if (PaymentRequest.State == PaymentRequestState.Completed && !_paymentWebOptions.PaymentSuccessfulCallbackUrl.IsNullOrWhiteSpace()) From 55e5fcdccc2e28321666b91ad365884b7210006c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enis=20Necipo=C4=9Flu?= Date: Wed, 20 Oct 2021 16:26:32 +0300 Subject: [PATCH 2/2] Update PaymentRequestCompletedEto.cs --- .../PaymentRequests/PaymentRequestCompletedEto.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/payment/src/Payment.Domain.Shared/PaymentRequests/PaymentRequestCompletedEto.cs b/modules/payment/src/Payment.Domain.Shared/PaymentRequests/PaymentRequestCompletedEto.cs index c537f1b..34059c3 100644 --- a/modules/payment/src/Payment.Domain.Shared/PaymentRequests/PaymentRequestCompletedEto.cs +++ b/modules/payment/src/Payment.Domain.Shared/PaymentRequests/PaymentRequestCompletedEto.cs @@ -8,6 +8,7 @@ namespace Payment.PaymentRequests public class PaymentRequestCompletedEto : EtoBase, IHasExtraProperties { public Guid PaymentRequestId { get; set; } + public ExtraPropertyDictionary ExtraProperties { get; set; } } }