mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 22:30:55 +00:00
payment | webhook
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user