working on payment

This commit is contained in:
Tria
2026-06-04 16:18:14 +03:00
parent 6b82b11757
commit 93020b3153
10 changed files with 664 additions and 0 deletions

View File

@@ -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() {
}
}