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
Hi @marketbus
Actually, I do not really care about the other Gateways. I intend on only using Stripe. Can you provide an example of how this will be done to integrate it with ABP?
Otherwise, I will have to write out my own Stripe integration.
At a high level, It would seem that I would use IPaymentRequestAppService to create a PaymentRequest. Map the PaymentRequest to a Stripe LineItems Object. Create a session using the Session Service. Then pass that SessionId to IPaymentRequestAppService's CompleteAsync method.
One of the main reasons why I signed up for the Commercial version of ABP, is actually because of the payments module. I am a sole developer, it's not really worth it to upgrade to one of your higher plans that include the complete source code. The payment's module without proper Blazor support seems incomplete.
Main point of Payment module is supporting more than one provider at the same time and let use to choose payment method. It's all about abstraction and yes you have to create a PaymentRequest and then that PaymentRequest must be paid.
I'm sorry about if the module doesn't meet your requirements. We'll work on according your feedbacks, thanks.
I basically followed the method that I mentioned above, and everything works, however, when I try to complete the transaction by calling CompleteAsync on the PaymentRequestAppService it throws an exception
"System.Collections.Generic.KeyNotFoundException: The given key 'PaymentRequestId' was not present in the dictionary."
I am able to verify that the transaction has been completed in the stripe dashboard, however, I would like it to be updated on the admin page as well.
If you please share code blocks where IPaymentRequestAppService is used. So I can understand the exception and find a solution.
Hi @thedatacrew Unfortunately, there is no best way that I recommend to you.
There is a lot of factors that affect while deciding mono-repo or multi-repo. For example, the most important one is your team. How do you develop software? Which services will have a dedicated team? There is a lot of questions, and source-control usage defines how you do that job in your way.
But I can highly recommend comparing the pros & cons between mono-repository and mono-repository.
Disclaimer: I've just summarized some of the topics from https://kinsta.com/blog/monorepo-vs-multi-repo/#benefits-of-monorepo You can read more about it.
In a summary, I can't say exactly the right thing because there is no single correct answer. Mostly your development cycle and culture define it.
Hi wend0rlin
Can you please set dropdownParent parameter as your modal.
It'll solve the problem. Read more about: https://select2.org/dropdown#dropdown-placement
$('#mySelect2').select2({
dropdownParent: $('#myModal')
});
Also we've solved that issue in the same way: https://github.com/abpframework/abp/pull/10734/files
Our ABP CLI and ABP Suite both are of version 4.4.3 , we are trying to create a new solution in the same version that is 4.4.3 however the version that we get is 5.0.0.
You can create a new project with-v parameter like below:
abp new Acme.BookStore -v 4.4.3
Now, the problem we are facing in 5.0.0 is that after migration when we update database an error regarding jsonb datatype occurs as we are using postgreSQL 9.1
We're using the latest version of EntityFramework and Npgsql, so if there is an error, it might be related to the implementation of Npgsql
asp-for property type is ModelExpression and it's not related to ABP.
You can create PropertyExpression on your own for your model https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.expression.property?view=net-6.0
And you can create a new ModelExpression with that expression. You can pass that dynamic ModelExpression to asp-for property.
Or you can use the already implemented Dynamic Forms feature of ABP Framework
You need to add project references first.
Same project layers should be referenced by same project layer. For example:
YourApp.Domain -> YourModule.Domain
YourApp.Domain.Shared -> YourModule.Domain.Shared
YourApp.Application -> YourModule.Application
YourApp.Application.Contracts -> YourModule.Application.Contracts
YourApp.HttpApi -> YourModule.HttpApi
YourApp.HttpApi.Client -> YourModule.HttpApi.Client
YourApp.Web -> YourModule.Web
...
To do that operation, go to your .csproj file, for example YourApp.Domain.csproj and add following reference:
<ItemGroup>
...
<!-- Place correct path to your module -->
<ProjectReference Include="..\..\modules\YourModule.Domain\YourModule.Domain.csproj" />
<ItemGroup>
Then you should add the DependsOn attribute over your YourAppDomainModule class:
[DependsOn(typeof(YourModuleDomainModule))] // <-- Add this line.
public class YourAppDomainModule : AbpModule
{
// ...
}
And make this step for each layer.
I can't provide a way that works perfectly in any situation. Each module has different parts and extensions (maybe), the current version of CLI cant guarantee your module will be installed properly if you replace the cache, but it's a way to try.
For the current version (v5.0), the best way to install module is manual installation. Adding dependencies to .csproj files and [DependsOn(typeof(...))] attribute over module class manually is the most consistent way.