Skip to content

Commit

Permalink
fixed: recursive failed method. (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sina-Soltani committed Feb 3, 2022
1 parent 1aa8667 commit ff7111d
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Parbad.Gateway.AsanPardakht.Internal
{
public class AsanPardakhtCrypto : IAsanPardakhtCrypto
internal class AsanPardakhtCrypto : IAsanPardakhtCrypto
{
private readonly HttpClient _httpClient;
private readonly AsanPardakhtGatewayOptions _gatewayOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Parbad.Gateway.AsanPardakht.Internal
{
public class AsanPardakhtHelper
internal class AsanPardakhtHelper
{
public static string CreateEncryptData(string key, string iv, string input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Parbad.Gateway.AsanPardakht.Internal.Models
{
public class AsanPardakhtCallbackResult
internal class AsanPardakhtCallbackResult
{
public bool IsSucceed { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Parbad.Gateway.AsanPardakht.Internal.Models
{
public class AsanPardakhtVerifyResult
internal class AsanPardakhtVerifyResult
{
public bool IsSucceed { get; internal set; }

Expand Down
22 changes: 14 additions & 8 deletions src/Parbad/src/Internal/PaymentRequestResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public static PaymentRequestResult SucceedWithRedirect(
return Succeed(transporter, gatewayAccountName);
}

/// <summary>
/// Creates an instance of <see cref="PaymentRequestResult"/> which indicates a successful result.
/// </summary>
public static PaymentRequestResult Succeed(IGatewayTransporter gatewayTransporter, string gatewayAccountName)
{
return new PaymentRequestResult
Expand All @@ -64,16 +67,19 @@ public static PaymentRequestResult Succeed(IGatewayTransporter gatewayTransporte
};
}

public static PaymentRequestResult Failed(string message)
{
return Failed(message, null);
}
/// <summary>
/// Creates an instance of <see cref="PaymentRequestResult"/> which indicates a failure result.
/// </summary>
public static PaymentRequestResult Failed(string message) => Failed(message, null);

public static PaymentRequestResult Failed(string message, string gatewayAccountName)
{
return Failed(message, gatewayAccountName);
}
/// <summary>
/// Creates an instance of <see cref="PaymentRequestResult"/> which indicates a failure result.
/// </summary>
public static PaymentRequestResult Failed(string message, string gatewayAccountName) => Failed(message, gatewayAccountName, null);

/// <summary>
/// Creates an instance of <see cref="PaymentRequestResult"/> which indicates a failure result.
/// </summary>
public static PaymentRequestResult Failed(string message, string gatewayAccountName, string gatewayResponseCode)
{
return new PaymentRequestResult
Expand Down
4 changes: 2 additions & 2 deletions src/Parbad/src/Parbad.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<PackageId>Parbad</PackageId>
<Product>Parbad</Product>
<VersionPrefix>3.8.2</VersionPrefix>
<VersionPrefix>3.8.3</VersionPrefix>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.0;netcoreapp3.1;net5.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<Authors>Parbad Sina Soltani</Authors>
Expand All @@ -23,7 +23,7 @@ More information: https://github.com/Sina-Soltani/Parbad
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageTags>parbad Payment Gateway virtual virtual-gateway Bank Iran Shetab IranKish Mellat Melli Sadad Parsian Pasargad Saman Asan-Pardakht پرداخت درگاه بانک ایران شتاب ایران-کیش ملت ملی سداد پارسیان پاسارگاد سامان آسان-پرداخت</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReleaseNotes>https://github.com/Sina-Soltani/Parbad/releases/tag/v3.8.2</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/Sina-Soltani/Parbad/releases/tag/v3.8.3</PackageReleaseNotes>
</PropertyGroup>

<PropertyGroup>
Expand Down
20 changes: 20 additions & 0 deletions src/Parbad/src/Parbad.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ff7111d

Please sign in to comment.