refactor: the whole paymanet service

This commit is contained in:
mahyargdz
2025-05-03 16:30:22 +03:30
parent 4f54774400
commit 2e2154d745
30 changed files with 1231 additions and 396 deletions
+15 -2
View File
@@ -1,6 +1,19 @@
export const ZARINPAL_CONFIG = "ZARINPAL_CONFIG";
//===============================================
export const PAYMENT = Object.freeze({
PAYMENT_QUEUE_NAME: "payment",
PAYMENT_START: "payment_start",
QUEUE_NAME: "payment",
START: "payment_start",
FIRST_REMINDER: "payment_first_reminder",
SECOND_REMINDER: "payment_second_reminder",
CANCELLATION: "payment_cancellation",
JOB_PRIORITY: 1, // high priority
JOB_ATTEMPTS: 3, // 3 times
JOB_BACKOFF: 5 * 1000, // ms
JOB_TIMEOUT: 10000, // timeout after 10 seconds
START_DELAY: 1 * 60 * 1000, // 1 minute delay in milliseconds
FIRST_REMINDER_DELAY: 5 * 60 * 1000, // 5 minutes
SECOND_REMINDER_DELAY: 10 * 60 * 1000, // 10 minutes
CANCELLATION_DELAY: 15 * 60 * 1000, // 15 minutes
});