Skip to content

Commit a225868

Browse files
committed
[backend] verify service, return the validation result given by razorpay's sdk
1 parent cae7248 commit a225868

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/orders/orders.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class OrdersService {
3939
async verify(verifyPaymentDto: VerifyPaymentDto): Promise<boolean> {
4040
console.log(verifyPaymentDto);
4141
// TODO: fetch order id from db to check if it exists
42-
validatePaymentVerification(
42+
const validation = validatePaymentVerification(
4343
{
4444
order_id: verifyPaymentDto.razorpay_order_id,
4545
payment_id: verifyPaymentDto.razorpay_payment_id,
@@ -48,6 +48,6 @@ export class OrdersService {
4848
rzpConfig.keySecret,
4949
);
5050
// TODO: mark payment success in db
51-
return true;
51+
return validation;
5252
}
5353
}

0 commit comments

Comments
 (0)