diff --git a/apps/edr-freight-api/src/modules/payment/payment.controller.ts b/apps/edr-freight-api/src/modules/payment/payment.controller.ts index c82192148..05b127968 100644 --- a/apps/edr-freight-api/src/modules/payment/payment.controller.ts +++ b/apps/edr-freight-api/src/modules/payment/payment.controller.ts @@ -65,24 +65,24 @@ export class PaymentController { } - @Get("test") - handleTest(@Res() res: Response) { + // @Get("test") + // handleTest(@Res() res: Response) { - const filePath = path.join(__dirname, "templates", "payment.hbs"); - console.log(filePath) - console.log(__dirname) - if (fs.existsSync(filePath)) { - const source = fs.readFileSync(filePath, "utf8"); - const template = Handlebars.compile(source); + // const filePath = path.join(__dirname, "templates", "payment.hbs"); + // console.log(filePath) + // console.log(__dirname) + // if (fs.existsSync(filePath)) { + // const source = fs.readFileSync(filePath, "utf8"); + // const template = Handlebars.compile(source); - const html = template({ - url: "https://example.com" - }); + // const html = template({ + // url: "https://example.com" + // }); - res.send(html) - } - } + // res.send(html) + // } + // } diff --git a/apps/edr-freight-api/src/modules/payment/payment.service.ts b/apps/edr-freight-api/src/modules/payment/payment.service.ts index 76f2f068e..b714d5175 100644 --- a/apps/edr-freight-api/src/modules/payment/payment.service.ts +++ b/apps/edr-freight-api/src/modules/payment/payment.service.ts @@ -95,213 +95,6 @@ export class PaymentService { return this.paymentRepo.getActivePaymentByRefIdAndMethod(refId, method) } - - - - getReceiptTemplate(data: { - vendorName: string; - vendorAddress: string; - receiptDate: string; - paymentMethod: string; - subtotal?: string; - total?: string; - currency: string; - reason?: string; - }) { - return ` - - -
- - -${data.vendorAddress}
-| Date | -${data.receiptDate} | -
| Payment Method | -- ${data.paymentMethod} - | -
| Description | -${data.reason ?? "-"} | -
| Subtotal | -- ${data.currency} ${data.subtotal ?? "0.00"} - | -
| - Total Paid - | -- ${data.currency} ${data.total ?? "0.00"} - | -