minor update

This commit is contained in:
Tria
2026-06-06 08:13:38 +03:00
parent ebe59f491a
commit 828f93d160
5 changed files with 28 additions and 39 deletions

View File

@@ -4,9 +4,9 @@ import { Public } from "@edr/api-common";
import { randomUUID } from "crypto";
import { Response } from "express"
import * as fs from 'fs';
import * as path from 'path';
import Handlebars from 'handlebars';
// import * as fs from 'fs';
// import * as path from 'path';
// import Handlebars from 'handlebars';
@Public()
@@ -21,13 +21,12 @@ export class PaymentController {
return res.send(filled)
}
@Post("/initiate")
@Post("/initiate/booking")
async initiatePayment() {
//Only for testing..
const redirectBaseURL = "http://localhost:3004/payment"
const description = "booking"
const data = await this.paymentService.pay(redirectBaseURL, 20, "ETB", "telebirr", description, (_) => {
const data = await this.paymentService.pay(20, "ETB", "telebirr", description, "booking", (_) => {
return new Promise((resp, _) => {
resp({
id: randomUUID(),
@@ -64,26 +63,4 @@ export class PaymentController {
`);
}
// @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 html = template({
// url: "https://example.com"
// });
// res.send(html)
// }
// }
}