zarin
This commit is contained in:
@@ -38,10 +38,10 @@ export class PaymentController {
|
|||||||
return this.paymentService.payInvoice(invoiceId, dto);
|
return this.paymentService.payInvoice(invoiceId, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('public/payments/online/:token/verify')
|
@Get('public/payments/online/zarin/verify')
|
||||||
@ApiOperation({ summary: 'Verify online payment' })
|
@ApiOperation({ summary: 'Verify online payment' })
|
||||||
async verifyOnlinePayment(
|
async verifyOnlinePayment(
|
||||||
@Param('token') token: string,
|
@Query('Authority') token: string,
|
||||||
@Res() res: Response,
|
@Res() res: Response,
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export class ZarinpalGateway implements IPaymentGateway {
|
|||||||
|
|
||||||
async requestPayment({ amount, invoiceId }: IRequestPaymentParams): Promise<IRequestPaymentData> {
|
async requestPayment({ amount, invoiceId }: IRequestPaymentParams): Promise<IRequestPaymentData> {
|
||||||
// Transform camelCase to snake_case for Zarinpal API v4
|
// Transform camelCase to snake_case for Zarinpal API v4
|
||||||
const callbackUrl = `${this.apiUrl}/verify/${invoiceId}`;
|
const callbackUrl = `${this.apiUrl}/public/payments/online/zarin/verify`;
|
||||||
const zarinpalRequest: IZarinpalRequestPayment = {
|
const zarinpalRequest: IZarinpalRequestPayment = {
|
||||||
amount,
|
amount,
|
||||||
merchant_id: this.zarinpalMerchantId,
|
merchant_id: this.zarinpalMerchantId,
|
||||||
|
|||||||
Reference in New Issue
Block a user