Closed cheurfa20081984 closed 2 years ago
Avertissement NETSDK1182 le ciblage de .NET 6.0 dans Visual Studio 2019 n’est pas pris en charge.
.NET 6 is not installed
To use MinimalApi test you have to use .NET 6.0, because ASP.NET Minimal API was only introduced in .NET 6
To use ConsoleTest you can compile the provided Console Test Project, change the SDK to any version you want, or create your own
Provided Console Test is a demonstration how you can set up ChargilyClient without Dependency Injection (even though the client is generated through Service Provider under the hood)
This is the most generic way to use it and it doesn't require any messing with dependency injection
using chargily.epay.csharp;
var client = ChagilyEpay.CreateClient("[API_KEY]");
var payment = new EpayPaymentRequest()
{
InvoiceNumber = "[INVOICE_NUMBER]",
Name = "Ahmed",
Email = "rainxh11@gmail.com",
Amount = 1500,
DiscountPercentage = 5.0,
PaymentMethod = PaymentMethod.EDAHABIA,
BackUrl = "https://yourapp.com/",
WebhookUrl = "https://api.yourbackend.com/webhook-validator",
ExtraInfo = "Product Purchase"
};
var response = await client.CreatePayment(payment);
This is using .NET 6.0 Top Statements
Project Sdk="Microsoft.NET.Sdk">
problem execustion en consol test problem version chargily 1.0.2 na pas compatible chargily epaygetway problem monque de dll
Gravité Code Description Projet Fichier Ligne État de la suppression Avertissement NETSDK1182 le ciblage de .NET 6.0 dans Visual Studio 2019 n’est pas pris en charge. Chargily.Epay.CSharp.AspNetCore.MinimalAPIExample C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets 134
<Target Name="_WarnWhenUsingNET6AndVSPriorTo17" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="$([MSBuild]::VersionLessThan($(VisualStudioVersion), '17.0')) and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))">
Gravité Code Description Projet Fichier Ligne État de la suppression Erreur NU1104 Projet 'C:\Users\DEMDZ\Desktop\chargily-epay-csharp-1.0.2\Chargily.EpayGateway.NET\Chargily.EpayGateway.NET.csproj' introuvable. Vérifiez que la référence de projet est valide et que le fichier projet existe. ConsoleTest C:\Users\DEMDZ\Desktop\chargily-epay-csharp-1.0.2\ConsoleTest\ConsoleTest.csproj 1