diff --git a/services/workflows-service/src/transaction/dtos/transaction-create.dto.ts b/services/workflows-service/src/transaction/dtos/transaction-create.dto.ts index 8e6f7c76c5..5f7e71b5e7 100644 --- a/services/workflows-service/src/transaction/dtos/transaction-create.dto.ts +++ b/services/workflows-service/src/transaction/dtos/transaction-create.dto.ts @@ -33,7 +33,9 @@ export const AltPaymentBrandNames = { SCB_PAYNOW: 'scb_paynow', ['China UnionPay']: 'china unionpay', ['American Express']: 'american express', - + ['ALIPAYHOST']: 'alipayhost', + ['WECHAT']: 'wechathost', + ['GRABPAY']: 'grabpay', ...PaymentBrandName, } as const; @@ -165,9 +167,9 @@ export class TransactionCreateAltDto { @ApiProperty({ required: true }) @Transform(({ value }) => value.toLowerCase()) - @IsEnum(AltPaymentBrandNames) + @IsString() @IsNotEmpty() - tx_product!: AltPaymentBrandNames; + tx_product!: string; @ApiProperty({ required: false }) @IsString() diff --git a/services/workflows-service/src/transaction/transaction.mapper.ts b/services/workflows-service/src/transaction/transaction.mapper.ts index 96fbb4a9c2..69199b7330 100644 --- a/services/workflows-service/src/transaction/transaction.mapper.ts +++ b/services/workflows-service/src/transaction/transaction.mapper.ts @@ -204,6 +204,12 @@ export class TransactionEntityMapper { return 'china_union_pay'; case 'american express': return 'american_express'; + case 'alipayhost': + return 'alipay_host'; + case 'wechathost': + return 'wechat_host'; + case 'grabpay': + return 'grab_pay'; default: return undefined; }