mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
working on payment
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { Controller, Post } from "@nestjs/common";
|
||||
import { PaymentService } from "./payment.service";
|
||||
import { randomUUID } from "crypto";
|
||||
|
||||
@Controller("payments")
|
||||
export class PaymentController {
|
||||
constructor(private readonly paymentService: PaymentService) { }
|
||||
|
||||
@Post("/initiate")
|
||||
async initiatePayment() {
|
||||
const tableId = randomUUID()
|
||||
const resp = await this.paymentService.create({
|
||||
amount: 20,
|
||||
currency: "etb",
|
||||
method: "telebirr",
|
||||
type: "booking",
|
||||
tableId: tableId
|
||||
})
|
||||
return resp
|
||||
}
|
||||
|
||||
@Post("web-hooks/telebirr")
|
||||
paymentWebhook() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user