diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs index d6239ed2..e006e694 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs @@ -124,6 +124,7 @@ namespace EShopOnAbp.PublicWeb options.Scope.Add("AdministrationService"); options.Scope.Add("BasketService"); options.Scope.Add("CatalogService"); + options.Scope.Add("PaymentService"); }); var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.Generated.cs b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.Generated.cs new file mode 100644 index 00000000..c59692b4 --- /dev/null +++ b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.Generated.cs @@ -0,0 +1,50 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using EShopOnAbp.PaymentService.PaymentRequests; + +// ReSharper disable once CheckNamespace +namespace EShopOnAbp.PaymentService.Controllers.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IPaymentRequestAppService), typeof(PaymentRequestClientProxy))] + public partial class PaymentRequestClientProxy : ClientProxyBase, IPaymentRequestAppService + { + public virtual async Task CompleteAsync(string token) + { + return await RequestAsync(nameof(CompleteAsync), new ClientProxyRequestTypeValue + { + { typeof(string), token } + }); + } + + public virtual async Task CreateAsync(PaymentRequestCreationDto input) + { + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(PaymentRequestCreationDto), input } + }); + } + + public virtual async Task HandleWebhookAsync(string payload) + { + return await RequestAsync(nameof(HandleWebhookAsync), new ClientProxyRequestTypeValue + { + { typeof(string), payload } + }); + } + + public virtual async Task StartAsync(PaymentRequestStartDto input) + { + return await RequestAsync(nameof(StartAsync), new ClientProxyRequestTypeValue + { + { typeof(PaymentRequestStartDto), input } + }); + } + } +} diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.cs b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.cs new file mode 100644 index 00000000..7e7c5f7d --- /dev/null +++ b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.cs @@ -0,0 +1,8 @@ +// This file is part of PaymentRequestClientProxy, you can customize it here +// ReSharper disable once CheckNamespace +namespace EShopOnAbp.PaymentService.Controllers.ClientProxies +{ + public partial class PaymentRequestClientProxy + { + } +} diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentService-generate-proxy.json b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentService-generate-proxy.json deleted file mode 100644 index cf60aca6..00000000 --- a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentService-generate-proxy.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "modules": { - "PaymentService": { - "rootPath": "PaymentService", - "remoteServiceName": "PaymentService", - "controllers": { - "EShopOnAbp.PaymentService.Samples.SampleController": { - "controllerName": "Sample", - "controllerGroupName": "Sample", - "type": "EShopOnAbp.PaymentService.Samples.SampleController", - "interfaces": [ - { - "type": "EShopOnAbp.PaymentService.Samples.ISampleAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/PaymentService/sample", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "EShopOnAbp.PaymentService.Samples.SampleDto", - "typeSimple": "EShopOnAbp.PaymentService.Samples.SampleDto" - }, - "allowAnonymous": null, - "implementFrom": "EShopOnAbp.PaymentService.Samples.ISampleAppService" - }, - "GetAuthorizedAsync": { - "uniqueName": "GetAuthorizedAsync", - "name": "GetAuthorizedAsync", - "httpMethod": "GET", - "url": "api/PaymentService/sample/authorized", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "EShopOnAbp.PaymentService.Samples.SampleDto", - "typeSimple": "EShopOnAbp.PaymentService.Samples.SampleDto" - }, - "allowAnonymous": false, - "implementFrom": "EShopOnAbp.PaymentService.Samples.ISampleAppService" - } - } - } - } - } - }, - "types": {} -} \ No newline at end of file diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/SampleClientProxy.Generated.cs b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/SampleClientProxy.Generated.cs deleted file mode 100644 index c1eda3e6..00000000 --- a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/SampleClientProxy.Generated.cs +++ /dev/null @@ -1,15 +0,0 @@ -// This file is automatically generated by ABP framework to use MVC Controllers from CSharp -using System; -using System.Threading.Tasks; -using Volo.Abp.Application.Dtos; -using Volo.Abp.Http.Client; -using Volo.Abp.Http.Modeling; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Http.Client.ClientProxying; -using EShopOnAbp.PaymentService.Samples; - -// ReSharper disable once CheckNamespace -namespace EShopOnAbp.PaymentService.Samples.ClientProxies -{ - -} diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/SampleClientProxy.cs b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/SampleClientProxy.cs deleted file mode 100644 index 63e60b1d..00000000 --- a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/SampleClientProxy.cs +++ /dev/null @@ -1,8 +0,0 @@ -// This file is part of SampleClientProxy, you can customize it here -// ReSharper disable once CheckNamespace -namespace EShopOnAbp.PaymentService.Samples.ClientProxies -{ - public partial class SampleClientProxy - { - } -} diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/payment-generate-proxy.json b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/payment-generate-proxy.json new file mode 100644 index 00000000..7f45f280 --- /dev/null +++ b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/payment-generate-proxy.json @@ -0,0 +1,171 @@ +{ + "modules": { + "payment": { + "rootPath": "payment", + "remoteServiceName": "PaymentService", + "controllers": { + "EShopOnAbp.PaymentService.Controllers.PaymentRequestController": { + "controllerName": "PaymentRequest", + "controllerGroupName": "PaymentRequest", + "type": "EShopOnAbp.PaymentService.Controllers.PaymentRequestController", + "interfaces": [ + { + "type": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService" + } + ], + "actions": { + "CompleteAsyncByToken": { + "uniqueName": "CompleteAsyncByToken", + "name": "CompleteAsync", + "httpMethod": "POST", + "url": "api/payment/requests/complete", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "token", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "token", + "name": "token", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestDto", + "typeSimple": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestDto" + }, + "allowAnonymous": null, + "implementFrom": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/payment/requests", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestCreationDto, EShopOnAbp.PaymentService.Application.Contracts", + "type": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestCreationDto", + "typeSimple": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestCreationDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestCreationDto", + "typeSimple": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestCreationDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestDto", + "typeSimple": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestDto" + }, + "allowAnonymous": null, + "implementFrom": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService" + }, + "HandleWebhookAsyncByPayload": { + "uniqueName": "HandleWebhookAsyncByPayload", + "name": "HandleWebhookAsync", + "httpMethod": "POST", + "url": "api/payment/requests/webhook", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "payload", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "payload", + "name": "payload", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Boolean", + "typeSimple": "boolean" + }, + "allowAnonymous": null, + "implementFrom": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService" + }, + "StartAsyncByInput": { + "uniqueName": "StartAsyncByInput", + "name": "StartAsync", + "httpMethod": "POST", + "url": "api/payment/requests/start", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestStartDto, EShopOnAbp.PaymentService.Application.Contracts", + "type": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestStartDto", + "typeSimple": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestStartDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestStartDto", + "typeSimple": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestStartDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestStartResultDto", + "typeSimple": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestStartResultDto" + }, + "allowAnonymous": null, + "implementFrom": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file