up
This commit is contained in:
@@ -53,7 +53,7 @@ export class PaymentGatewayService {
|
|||||||
|
|
||||||
// Handle ZarinPal gateway
|
// Handle ZarinPal gateway
|
||||||
if (gateway === PaymentGatewayEnum.ZarinPal) {
|
if (gateway === PaymentGatewayEnum.ZarinPal) {
|
||||||
const callbackUrl = `${domain}/payments/${orderId}/callback`;
|
const callbackUrl = `${domain}/verify/${orderId}`;
|
||||||
try {
|
try {
|
||||||
const gatewayResponse = await this.requestToZarinPalGateway({
|
const gatewayResponse = await this.requestToZarinPalGateway({
|
||||||
amount,
|
amount,
|
||||||
@@ -85,7 +85,7 @@ export class PaymentGatewayService {
|
|||||||
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
||||||
throw new BadRequestException(`Failed to connect to payment gateway: ${errorMessage}`);
|
throw new BadRequestException(`Failed to connect to payment gateway: ${errorMessage}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If gateway is not supported, throw an error
|
// If gateway is not supported, throw an error
|
||||||
throw new BadRequestException(`Unsupported payment gateway: ${String(gateway)}`);
|
throw new BadRequestException(`Unsupported payment gateway: ${String(gateway)}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user