mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 12:58:13 +00:00
minor update
This commit is contained in:
@@ -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)
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user