Removed passphrase from PaymentGateway
continuous-integration/drone/pr Build is failing

This commit is contained in:
Khwezi Mngoma
2026-06-01 09:19:08 +02:00
parent 8fe129e19c
commit f1ef614cbb
7 changed files with 1260 additions and 9 deletions
@@ -46,7 +46,6 @@ public static class Mappers
MerchantId = entity.MerchantId, MerchantId = entity.MerchantId,
MerchantKey = entity.MerchantKey, MerchantKey = entity.MerchantKey,
Name = entity.Name, Name = entity.Name,
Passphrase = entity.Passphrase,
Website = entity.Website, Website = entity.Website,
}; };
@@ -15,6 +15,5 @@ public sealed class PaymentGatewayConfiguration : IEntityTypeConfiguration<Payme
builder.Property(f => f.MerchantId).IsRequired(); builder.Property(f => f.MerchantId).IsRequired();
builder.Property(f => f.Enabled); builder.Property(f => f.Enabled);
builder.Property(f => f.Name).IsRequired(); builder.Property(f => f.Name).IsRequired();
builder.Property(f => f.Passphrase).IsRequired();
} }
} }
@@ -16,8 +16,6 @@ public class PaymentGateway
public string? MerchantKey { get; set; } public string? MerchantKey { get; set; }
public string? Passphrase { get; set; }
public bool IsSandbox { get; set; } public bool IsSandbox { get; set; }
public bool Enabled { get; set; } public bool Enabled { get; set; }
@@ -174,7 +174,6 @@ public sealed class PaymentService(IDbContextFactory<MidrandBooksDbContext> cont
MerchantKey = request.MerchantKey, MerchantKey = request.MerchantKey,
Name = request.Name, Name = request.Name,
Website = request.Website, Website = request.Website,
Passphrase = "N/A",
}); });
return await context.SaveChangesAsync(cancellationToken) > 0 return await context.SaveChangesAsync(cancellationToken) > 0
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LiteCharms.Features.MidrandBooks.Postgres.Migrations
{
/// <inheritdoc />
public partial class RemovedPassphraseFromPaymentGateway : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Passphrase",
table: "Gateways");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Passphrase",
table: "Gateways",
type: "text",
nullable: false,
defaultValue: "");
}
}
}
@@ -604,10 +604,6 @@ namespace LiteCharms.Features.MidrandBooks.Postgres.Migrations
.IsRequired() .IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Passphrase")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime?>("UpdatedAt") b.Property<DateTime?>("UpdatedAt")
.HasColumnType("timestamp with time zone"); .HasColumnType("timestamp with time zone");