payment | webhook

This commit is contained in:
Tria
2026-06-05 17:34:33 +03:00
parent 6786bdd210
commit ebe59f491a
3 changed files with 17 additions and 225 deletions

View File

@@ -54,11 +54,10 @@ export class TelebirrWebhookService {
}
switch (payload.trade_status) {
case "SUCCEEDED":
console.log(payment.id)
await this.paymentRepo.update({ id: payment.id }, { status: "success" })
await this.paymentRepo.update({ id: payment.id }, { status: "success", paidAt: new Date() })
switch (payment.type) {
case "booking":
await this.bookingRepo.update(payment.refId, { paymentStatus: "PAID" })
await this.bookingRepo.update(payment.refId, { paymentStatus: "PAID", })
break;
}
break;