refactor: remove PYMS microservice, use ZarinPal directly in CMS
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m26s

- Remove PYMSPaymentService.cs and PYMS proto files
- Remove 'pyms' case from DI ConfigureServices
- Remove PYMS config from appsettings
- Switch PaymentProvider to 'zarinpal' (direct integration)
- ZarinPalPaymentService handles sandbox/production, verify, errors
- PYMS deployment/service/ingress removed from K8s
This commit is contained in:
masoodafar-web
2026-02-15 23:25:20 +03:30
parent 2502cbbda2
commit 207f53ef80
7 changed files with 3 additions and 621 deletions
@@ -1,41 +0,0 @@
syntax = "proto3";
package pyms_messages;
option csharp_namespace = "CMSMicroservice.Protobuf.Protos.PYMS";
service PYMSPublicMessageContract{}
message PaginationState
{
int32 page_number = 1;
int32 page_size = 2;
}
message MetaData
{
int64 current_page = 1;
int64 total_page = 2;
int64 page_size = 3;
int64 total_count = 4;
bool has_previous = 5;
bool has_next = 6;
}
message DecimalValue
{
int64 units = 1;
sfixed32 nanos = 2;
}
enum TransactionTypeEnum
{
Real = 0;
Sandbox = 1;
}
enum CurrencyEnum
{
IRR = 0;
IRT = 1;
}
@@ -1,279 +0,0 @@
syntax = "proto3";
package pyms_transaction;
import "pyms/pyms_public_messages.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option csharp_namespace = "CMSMicroservice.Protobuf.Protos.PYMS.Transaction";
service TransactionContract
{
rpc CreateNewTransaction(CreateNewTransactionRequest) returns (CreateNewTransactionResponse){
option (google.api.http) = {
post: "/CreateNewTransaction"
body: "*"
};
};
rpc UpdateTransaction(UpdateTransactionRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
put: "/UpdateTransaction"
body: "*"
};
};
rpc DeleteTransaction(DeleteTransactionRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
delete: "/DeleteTransaction"
body: "*"
};
};
rpc GetTransaction(GetTransactionRequest) returns (GetTransactionResponse){
option (google.api.http) = {
get: "/GetTransaction"
};
};
rpc GetAllTransactionByFilter(GetAllTransactionByFilterRequest) returns (GetAllTransactionByFilterResponse){
option (google.api.http) = {
get: "/GetAllTransactionByFilter"
};
};
rpc PaymentRequest(PaymentRequestRequest) returns (PaymentRequestResponse){
option (google.api.http) = {
post: "/PaymentRequest"
body: "*"
};
};
rpc PaymentVerification(PaymentVerificationRequest) returns (PaymentVerificationResponse){
option (google.api.http) = {
post: "/PaymentVerification"
body: "*"
};
};
}
message CreateNewTransactionRequest
{
string merchant_id = 1;
int64 amount = 2;
string callback_url = 3;
string description = 4;
google.protobuf.StringValue mobile = 5;
google.protobuf.StringValue email = 6;
google.protobuf.Int32Value request_status_code = 7;
google.protobuf.StringValue request_status_message = 8;
google.protobuf.StringValue authority = 9;
google.protobuf.StringValue fee_type = 10;
google.protobuf.Int64Value fee = 11;
oneof Currency_item
{
pyms_messages.CurrencyEnum currency = 12;
}
bool payment_status = 13;
google.protobuf.Int32Value verification_status_code = 14;
google.protobuf.StringValue verification_status_message = 15;
google.protobuf.StringValue card_hash = 16;
google.protobuf.StringValue card_pan = 17;
google.protobuf.StringValue ref_id = 18;
google.protobuf.StringValue order_id = 19;
oneof Type_item
{
pyms_messages.TransactionTypeEnum type = 20;
}
}
message CreateNewTransactionResponse
{
int64 id = 1;
}
message UpdateTransactionRequest
{
int64 id = 1;
string merchant_id = 2;
int64 amount = 3;
string callback_url = 4;
string description = 5;
google.protobuf.StringValue mobile = 6;
google.protobuf.StringValue email = 7;
google.protobuf.Int32Value request_status_code = 8;
google.protobuf.StringValue request_status_message = 9;
google.protobuf.StringValue authority = 10;
google.protobuf.StringValue fee_type = 11;
google.protobuf.Int64Value fee = 12;
oneof Currency_item
{
pyms_messages.CurrencyEnum currency = 13;
}
bool payment_status = 14;
google.protobuf.Int32Value verification_status_code = 15;
google.protobuf.StringValue verification_status_message = 16;
google.protobuf.StringValue card_hash = 17;
google.protobuf.StringValue card_pan = 18;
google.protobuf.StringValue ref_id = 19;
google.protobuf.StringValue order_id = 20;
oneof Type_item
{
pyms_messages.TransactionTypeEnum type = 21;
}
}
message DeleteTransactionRequest
{
int64 id = 1;
}
message GetTransactionRequest
{
google.protobuf.Int64Value id = 1;
google.protobuf.StringValue authority = 2;
}
message GetTransactionResponse
{
int64 id = 1;
string merchant_id = 2;
int64 amount = 3;
string callback_url = 4;
string description = 5;
google.protobuf.StringValue mobile = 6;
google.protobuf.StringValue email = 7;
google.protobuf.Int32Value request_status_code = 8;
google.protobuf.StringValue request_status_message = 9;
google.protobuf.StringValue authority = 10;
google.protobuf.StringValue fee_type = 11;
google.protobuf.Int64Value fee = 12;
oneof Currency_item
{
pyms_messages.CurrencyEnum currency = 13;
}
bool payment_status = 14;
google.protobuf.Int32Value verification_status_code = 15;
google.protobuf.StringValue verification_status_message = 16;
google.protobuf.StringValue card_hash = 17;
google.protobuf.StringValue card_pan = 18;
google.protobuf.StringValue ref_id = 19;
google.protobuf.StringValue order_id = 20;
oneof Type_item
{
pyms_messages.TransactionTypeEnum type = 21;
}
}
message GetAllTransactionByFilterRequest
{
pyms_messages.PaginationState pagination_state = 1;
google.protobuf.StringValue sort_by = 2;
GetAllTransactionByFilterFilter filter = 3;
}
message GetAllTransactionByFilterFilter
{
google.protobuf.Int64Value id = 1;
google.protobuf.StringValue merchant_id = 2;
google.protobuf.Int64Value amount = 3;
google.protobuf.StringValue callback_url = 4;
google.protobuf.StringValue description = 5;
google.protobuf.StringValue mobile = 6;
google.protobuf.StringValue email = 7;
google.protobuf.Int32Value request_status_code = 8;
google.protobuf.StringValue request_status_message = 9;
google.protobuf.StringValue authority = 10;
google.protobuf.StringValue fee_type = 11;
google.protobuf.Int64Value fee = 12;
oneof Currency_item
{
pyms_messages.CurrencyEnum currency = 13;
}
google.protobuf.BoolValue payment_status = 14;
google.protobuf.Int32Value verification_status_code = 15;
google.protobuf.StringValue verification_status_message = 16;
google.protobuf.StringValue card_hash = 17;
google.protobuf.StringValue card_pan = 18;
google.protobuf.StringValue ref_id = 19;
google.protobuf.StringValue order_id = 20;
oneof Type_item
{
pyms_messages.TransactionTypeEnum type = 21;
}
}
message GetAllTransactionByFilterResponse
{
pyms_messages.MetaData meta_data = 1;
repeated GetAllTransactionByFilterResponseModel models = 2;
}
message GetAllTransactionByFilterResponseModel
{
int64 id = 1;
string merchant_id = 2;
int64 amount = 3;
string callback_url = 4;
string description = 5;
google.protobuf.StringValue mobile = 6;
google.protobuf.StringValue email = 7;
google.protobuf.Int32Value request_status_code = 8;
google.protobuf.StringValue request_status_message = 9;
google.protobuf.StringValue authority = 10;
google.protobuf.StringValue fee_type = 11;
google.protobuf.Int64Value fee = 12;
oneof Currency_item
{
pyms_messages.CurrencyEnum currency = 13;
}
bool payment_status = 14;
google.protobuf.Int32Value verification_status_code = 15;
google.protobuf.StringValue verification_status_message = 16;
google.protobuf.StringValue card_hash = 17;
google.protobuf.StringValue card_pan = 18;
google.protobuf.StringValue ref_id = 19;
google.protobuf.StringValue order_id = 20;
oneof Type_item
{
pyms_messages.TransactionTypeEnum type = 21;
}
}
message PaymentRequestRequest
{
google.protobuf.StringValue merchant_id = 1;
int64 amount = 2;
string callback_url = 3;
google.protobuf.StringValue description = 4;
google.protobuf.StringValue mobile = 5;
google.protobuf.StringValue email = 6;
oneof Currency_item
{
pyms_messages.CurrencyEnum currency = 7;
}
oneof Type_item
{
pyms_messages.TransactionTypeEnum type = 8;
}
google.protobuf.StringValue order_id = 9;
}
message PaymentRequestResponse
{
string payment_g_w_url = 1;
}
message PaymentVerificationRequest
{
string authority = 1;
string status = 2;
}
message PaymentVerificationResponse
{
int64 id = 1;
bool payment_status = 2;
string message = 3;
google.protobuf.StringValue ref_id = 4;
google.protobuf.StringValue order_id = 5;
google.protobuf.Int32Value verification_status_code = 6;
}