auth clssification last pay bug fix

This commit is contained in:
Kallesh B S 2025-09-17 10:06:59 +05:30
parent 18c7a2799e
commit 3eb495b007
2 changed files with 6 additions and 4 deletions

View File

@ -10,7 +10,7 @@ import { Roles } from 'src/decorators/roles.decorator';
import { JwtAuthGuard } from 'src/guards/jwt-auth.guard';
@ApiTags('Auth')
@Controller()
@Controller("1")
export class AuthController {
constructor(
private readonly authService: AuthService,

View File

@ -1716,9 +1716,11 @@ export class CarnetApplicationService {
const approve_result = await this.OrderDetails({ P_ORDERID: body.P_ORDERID });
const formattedAmount = await this.formatAmount(body.P_PRICE);
if (approve_result.data.id === body.P_ORDERID
&& approve_result.data.status === "APPROVED"
&& approve_result.data.purchase_units[0]?.amount?.value === body.P_PRICE + ""
&& approve_result.data.purchase_units[0]?.amount?.value === formattedAmount + ""
) {
await this.SaveHistory({
P_APPLICATIONNAME: body.P_APPLICATIONNAME,
@ -1768,7 +1770,7 @@ export class CarnetApplicationService {
P_PAYMENTERROR: `Error while validating user approval`
});
throw new InternalServerException();
throw new InternalServerException("failed to save approved status");
}
} catch (error: any) {