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;