This commit is contained in:
2026-05-24 16:08:13 +03:30
parent 0f74404192
commit 8ef4152853
4 changed files with 10 additions and 10 deletions
@@ -50,7 +50,7 @@ export class ZarinpalGateway implements IPaymentGateway {
merchant_id: this.zarinpalMerchantId, merchant_id: this.zarinpalMerchantId,
description: `Payment for order #${invoiceId}`, description: `Payment for order #${invoiceId}`,
callback_url: callbackUrl, callback_url: callbackUrl,
currency: 'IRT', currency: 'IRR',
metadata: { metadata: {
order_id: invoiceId, order_id: invoiceId,
}, },
+1 -1
View File
@@ -36,7 +36,7 @@ export interface IZarinpalRequestPayment {
email?: string; email?: string;
}; };
referrer_id?: string; referrer_id?: string;
currency: 'IRT'; currency: 'IRR';
} }
export interface IZarinpalPaymentResponse { export interface IZarinpalPaymentResponse {
data: { data: {
@@ -34,7 +34,7 @@ export class PaymentListeners {
return; return;
} }
const body = `پرداخت آنلاین جدید: پیش‌فاکتور شماره ${event.invoiceNumber} به مبلغ ${event.total.toLocaleString('fa-IR')} تومان`; const body = `پرداخت آنلاین جدید: پیش‌فاکتور شماره ${event.invoiceNumber} به مبلغ ${event.total.toLocaleString('fa-IR')} ریال`;
const notifications = admins.map((admin) => const notifications = admins.map((admin) =>
this.em.create(Notification, { this.em.create(Notification, {
@@ -82,7 +82,7 @@ export class PaymentListeners {
// : event., // : event.,
// message: { // message: {
// title: NotifTitleEnum.PAYMENT_SUCCESS, // title: NotifTitleEnum.PAYMENT_SUCCESS,
// content: `پرداخت سفارش شماره ${event.orderNumber} با روش ${this.getPaymentMethodFarsi(event.paymentMethod)} و مبلغ ${event.total} تومان با موفقیت انجام شد`, // content: `پرداخت سفارش شماره ${event.orderNumber} با روش ${this.getPaymentMethodFarsi(event.paymentMethod)} و مبلغ ${event.total} ریال با موفقیت انجام شد`,
// sms: { // sms: {
// templateId: this.orderCreatedSmsTemplateId, // templateId: this.orderCreatedSmsTemplateId,
// parameters: { // parameters: {
@@ -92,7 +92,7 @@ export class PaymentListeners {
// }, // },
// pushNotif: { // pushNotif: {
// title: `پرداخت موفق`, // title: `پرداخت موفق`,
// content: `پرداخت سفارش شماره ${event.orderNumber} با روش ${this.getPaymentMethodFarsi(event.paymentMethod)} و مبلغ ${event.total} تومان با موفقیت انجام شد`, // content: `پرداخت سفارش شماره ${event.orderNumber} با روش ${this.getPaymentMethodFarsi(event.paymentMethod)} و مبلغ ${event.total} ریال با موفقیت انجام شد`,
// icon: ``, // icon: ``,
// action: { // action: {
// type: NotifTitleEnum.PAYMENT_SUCCESS, // type: NotifTitleEnum.PAYMENT_SUCCESS,
@@ -130,7 +130,7 @@ export class PaymentListeners {
// : event., // : event.,
// message: { // message: {
// title: NotifTitleEnum.ORDER_CREATED, // title: NotifTitleEnum.ORDER_CREATED,
// content: `سفارش شماره ${event.orderNumber} با مبلغ ${event.total} تومان با موفقیت ایجاد شد`, // content: `سفارش شماره ${event.orderNumber} با مبلغ ${event.total} ریال با موفقیت ایجاد شد`,
// sms: { // sms: {
// templateId: this.orderCreatedSmsTemplateId, // templateId: this.orderCreatedSmsTemplateId,
// parameters: { // parameters: {
@@ -140,7 +140,7 @@ export class PaymentListeners {
// }, // },
// pushNotif: { // pushNotif: {
// title: `سفارش جدید`, // title: `سفارش جدید`,
// content: `سفارش شماره ${event.orderNumber} با مبلغ ${event.total} تومان با موفقیت ایجاد شد`, // content: `سفارش شماره ${event.orderNumber} با مبلغ ${event.total} ریال با موفقیت ایجاد شد`,
// icon: `/`, // icon: `/`,
// action: { // action: {
// type: NotifTitleEnum.ORDER_CREATED, // type: NotifTitleEnum.ORDER_CREATED,
@@ -171,7 +171,7 @@ export class PaymentListeners {
// : event., // : event.,
// message: { // message: {
// title: NotifTitleEnum.PAYMENT_SUCCESS, // title: NotifTitleEnum.PAYMENT_SUCCESS,
// content: `پرداخت سفارش شماره ${order.orderNumber} با روش ${this.getPaymentMethodFarsi(order.paymentMethod.method)} و مبلغ ${order.total} تومان با موفقیت انجام شد`, // content: `پرداخت سفارش شماره ${order.orderNumber} با روش ${this.getPaymentMethodFarsi(order.paymentMethod.method)} و مبلغ ${order.total} ریال با موفقیت انجام شد`,
// sms: { // sms: {
// templateId: this.paymentSucceedSmsTemplateId, // templateId: this.paymentSucceedSmsTemplateId,
// parameters: { // parameters: {
@@ -181,7 +181,7 @@ export class PaymentListeners {
// }, // },
// pushNotif: { // pushNotif: {
// title: `پرداخت موفق`, // title: `پرداخت موفق`,
// content: `پرداخت سفارش شماره ${order.orderNumber} با روش ${this.getPaymentMethodFarsi(order.paymentMethod.method)} و مبلغ ${order.total} تومان با موفقیت انجام شد`, // content: `پرداخت سفارش شماره ${order.orderNumber} با روش ${this.getPaymentMethodFarsi(order.paymentMethod.method)} و مبلغ ${order.total} ریال با موفقیت انجام شد`,
// icon: `/`, // icon: `/`,
// action: { // action: {
// type: NotifTitleEnum.PAYMENT_SUCCESS, // type: NotifTitleEnum.PAYMENT_SUCCESS,
+1 -1
View File
@@ -34,7 +34,7 @@ export class CreateUserDto {
export class CreateUserAsAdminDto extends CreateUserDto { export class CreateUserAsAdminDto extends CreateUserDto {
@ApiProperty({ description: "User's max credit in Toman", example: 100000 }) @ApiProperty({ description: "User's max credit in Rial", example: 100000 })
@Transform(({ value }) => Number(value)) @Transform(({ value }) => Number(value))
@IsInt() @IsInt()
@Min(0) @Min(0)