Can you check if Account Pro module is updated too or any dependency which depends on account module is updated?
For now, you can include AbpPaymentApplicationModule in your Web project as a workaround until we'll release an update for it
Yes, it's an MVC Tiered solution, however your suggestion did not resolve the issue. Can you please explain how the payment application service can be called directly from the web projects code?
What I find a little odd is in you Volo.Payment.Application source you have 3 App Services defined for the Payment Module as shown below.
However in the Volo.Payment.HttpAPI source there is a Gateway and Plan controller that essentially call the application services as shown above but you don't have a 'PaymentRequestController' in the HttpAPI project as shown below.
Why is that?
Hi @Spospisil Payment operations are done by directly Web project for some security reasons. But in that case, you're right. It seems PaymentRequestController is missing. If we provide endpoints for that AppService, there will be a security problem. Because all complete or endpoints that perform update operations on PaymentReuqest will be accessible publicly. We'll
work on this in the next version.
Also your credit is refunded
If you place a select something like this: https://github.com/abpframework/abp/blob/b1170998f78a676c8685cde587282ac558f3e181/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml#L57
you can initialize from js like this: https://github.com/abpframework/abp/blob/b1170998f78a676c8685cde587282ac558f3e181/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/create.js#L23-L33
It's a good example from the CmsKit Blog selection
You need to replace XXX.Application
and XXX.EntityFrameworkCore
packages with XXX.HttpApi.Client
package for each module in Blazor.Server.Host project
Also, you need to remove your Kuys.Module.EmployeeManagement.Application
and Kuys.Module.EmployeeManagement.EntityFrameworkCore
project references from your Blazor.Server.Host project and add Kuys.Module.EmployeeManagement.HttpApi.Client
project reference to it.
After those changes make sure your AuthServer and RemoteServices configurations are made properly.
You can create a tiered project with following command and compare configuration.
abp new MyTieredBlazorApp --tiered -u blazor-server
Ok, got it. You need a tiered solution for Blazor-Server right?
Yes, webhooks are handled in HttpApi package. You need to configure WebHookSecret
in StripeOptions for the project which includes that HttpApi package.
If you complete this step for configuring webhooks, it'll update the status of PaymentRequest entities according to webhook feeds.
I think problem occurs following check from source code of Payment Module:
public class StripePaymentGateway : IPaymentGateway, ITransientDependency
{
public bool IsValid(PaymentRequest paymentRequest, Dictionary<string, object> properties)
{
var sessionId = properties["SessionId"]?.ToString();
if (sessionId.IsNullOrWhiteSpace())
{
throw new Exception("Empty SessionId.");
}
var sessionService = new SessionService();
var session = sessionService.Get(sessionId);
if (!session.PaymentStatus.Equals("paid", StringComparison.InvariantCulture))
{
throw new Exception("Session not paid.");
}
return session.Metadata["PaymentRequestId"] == paymentRequest.Id.ToString();
}
}
Can you check if session.Metadata["PaymentRequestId"]
is set or not?
Hi @murat.yuceer
Firstly, can you share steps to reproduce that error you faced?
How can I say to suite, create module project but blazor server host should be work like web assembly(not unified)
Doesn't the following command with ABP CLI solve your problem at the moment?
abp new Module2376 -t module
And those projects below you should run for test.
You can remove all UI projects except Blazor & Blazor WebAssembly.
So at that exception:
"System.Collections.Generic.KeyNotFoundException: The given key 'PaymentRequestId' was not present in the dictionary."
Can you see a file path and line number? I need entire exception stacktrace right now because your usage looks it is right