Browse Source

Add Payment Proxies

pull/48/head
enisn 4 years ago
parent
commit
64ee8362f8
  1. 1
      apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs
  2. 50
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.Generated.cs
  3. 8
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.cs
  4. 53
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentService-generate-proxy.json
  5. 15
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/SampleClientProxy.Generated.cs
  6. 8
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/SampleClientProxy.cs
  7. 171
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/payment-generate-proxy.json

1
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"]);

50
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>, IPaymentRequestAppService
{
public virtual async Task<PaymentRequestDto> CompleteAsync(string token)
{
return await RequestAsync<PaymentRequestDto>(nameof(CompleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), token }
});
}
public virtual async Task<PaymentRequestDto> CreateAsync(PaymentRequestCreationDto input)
{
return await RequestAsync<PaymentRequestDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(PaymentRequestCreationDto), input }
});
}
public virtual async Task<bool> HandleWebhookAsync(string payload)
{
return await RequestAsync<bool>(nameof(HandleWebhookAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), payload }
});
}
public virtual async Task<PaymentRequestStartResultDto> StartAsync(PaymentRequestStartDto input)
{
return await RequestAsync<PaymentRequestStartResultDto>(nameof(StartAsync), new ClientProxyRequestTypeValue
{
{ typeof(PaymentRequestStartDto), input }
});
}
}
}

8
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
{
}
}

53
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentService-generate-proxy.json

@ -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": {}
}

15
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/SampleClientProxy.Generated.cs

@ -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
{
}

8
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/SampleClientProxy.cs

@ -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
{
}
}

171
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": {}
}
Loading…
Cancel
Save