diff --git a/src/modules/payment/gateways/zarinpal.gateway.ts b/src/modules/payment/gateways/zarinpal.gateway.ts index 01bee6c..67626db 100755 --- a/src/modules/payment/gateways/zarinpal.gateway.ts +++ b/src/modules/payment/gateways/zarinpal.gateway.ts @@ -19,9 +19,9 @@ export class ZarinpalGateway implements IPaymentGateway { private readonly logger = new Logger(ZarinpalGateway.name); private readonly zarinpalRequestUrl: string; private readonly zarinpalVerifyUrl: string; - private readonly zarinpalPaymentBaseUrl: string; + private readonly zarinpalBaseUrl: string; private readonly zarinpalMerchantId: string; - private readonly apiUrl: string = 'https://negareh-api.dev.danakcorp.com/' + private readonly apiUrl: string private readonly axiosConfig = { timeout: 10_000, headers: { @@ -30,9 +30,9 @@ export class ZarinpalGateway implements IPaymentGateway { }; constructor(private readonly configService: ConfigService) { - const zarinpalBaseUrl = this.configService.get('ZARINPAL_BASE_URL') || 'https://sandbox.zarinpal.com'; - this.zarinpalRequestUrl = `${zarinpalBaseUrl}/pg/v4/payment/request.json`; - this.zarinpalVerifyUrl = `${zarinpalBaseUrl}/pg/v4/payment/verify.json`; + this.zarinpalBaseUrl = this.configService.get('ZARINPAL_BASE_URL') || 'https://sandbox.zarinpal.com'; + this.zarinpalRequestUrl = `${this.zarinpalBaseUrl}/pg/v4/payment/request.json`; + this.zarinpalVerifyUrl = `${this.zarinpalBaseUrl}/pg/v4/payment/verify.json`; this.zarinpalMerchantId = this.configService.getOrThrow('ZARINPAL_BASE_MERCHANT') this.apiUrl = this.configService.get('API_URL') || 'https://negareh-api.dev.danakcorp.com/' } @@ -87,7 +87,7 @@ export class ZarinpalGateway implements IPaymentGateway { throw new BadRequestException(message ?? PaymentMessage.ZARINPAL_PAYMENT_REQUEST_ERROR); } - const paymentUrl = `${this.zarinpalPaymentBaseUrl}/pg/StartPay/${authority}` + const paymentUrl = `${this.zarinpalBaseUrl}/pg/StartPay/${authority}` return { token: authority, paymentUrl }; } catch (error) {