From 020837db660d4402b4a94271c7dea25032623c0d Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Tue, 30 Dec 2025 21:20:42 +0330 Subject: [PATCH] add : Sep gateway for test --- src/modules/IPG/gateways/sep.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/modules/IPG/gateways/sep.ts b/src/modules/IPG/gateways/sep.ts index 1370a01..488a27f 100644 --- a/src/modules/IPG/gateways/sep.ts +++ b/src/modules/IPG/gateways/sep.ts @@ -15,8 +15,8 @@ class SepGateway { private logger = new Logger(SepGateway.name); private gatewayApiUrl: string = process.env.SEP_HOST || "https://sep.shaparak.ir"; - private callBackURL = `${process.env.SITE_URL}/payment/verify/SEP/`; - private TERMINAL_ID: string = process.env.SEP_TERMINAL_ID || "15364098"; + private callBackURL = `${process.env.SITE_URL}/payment/verify/saman/`; + private TERMINAL_ID: string = process.env.SEP_TERMINAL_ID || "15364098"; private requestHeader = { "Content-Type": "application/json", Accept: "application/json" }; async processPayment(amount: number, description: string, email: string, mobile: string, callBackPath: string) { @@ -25,18 +25,17 @@ class SepGateway { } const requesturl = `${this.gatewayApiUrl}/onlinepg/onlinepg`; - console.log("SEP Gateway processPayment called", email); + console.log("SEP Gateway processPayment called", email, description); try { const purchaseData = { Action: "Token", TerminalId: this.TERMINAL_ID, Amount: amount, // ریال - OrderId: description, RedirectUrl: `${this.callBackURL}${callBackPath}`, - ResNum: "1qaz@WSX", + ResNum: Date.now().toString(), CellNumber: mobile, }; - + console.log("purchase data", purchaseData); const response = await axios.post(requesturl, purchaseData, { headers: this.requestHeader }); const data = response.data;