mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 00:38:11 +00:00
fix:( payment ) fix date and add waafi demo callback
This commit is contained in:
@@ -79,6 +79,28 @@ export class PaymentsController {
|
||||
return this.service.getIntentByBookingId(bookingId);
|
||||
}
|
||||
|
||||
@Get("waafi/return")
|
||||
@ApiOperation({
|
||||
summary:
|
||||
"DEMO ONLY — confirm a Waafi payment from the browser-return params and return JSON for the " +
|
||||
"UI to display. The frontend success page forwards the Waafi query params here. Gated by " +
|
||||
"WAAFI_DEMO_TRUST_RETURN (INSECURE; real confirmation is the webhook/HPP_GETTRANINFO).",
|
||||
})
|
||||
@ApiQuery({ name: "referenceId", required: true })
|
||||
@ApiQuery({ name: "state", required: true })
|
||||
@ApiQuery({ name: "transactionId", required: false })
|
||||
waafiReturn(
|
||||
@Query("referenceId") referenceId: string,
|
||||
@Query("state") state: string,
|
||||
@Query("transactionId") transactionId: string,
|
||||
) {
|
||||
return this.service.confirmWaafiReturnDemo({
|
||||
referenceId,
|
||||
state,
|
||||
transactionId,
|
||||
});
|
||||
}
|
||||
|
||||
@Post("refund")
|
||||
@UseGuards(JwtGuard, RolesGuard)
|
||||
@Roles(UserRole.ADMIN, UserRole.STAFF, UserRole.AGENT)
|
||||
|
||||
Reference in New Issue
Block a user