Update index.ts

This commit is contained in:
AllenTJ7 2025-04-03 19:18:47 +05:30
parent 05d2b918b4
commit c32e5b1d63

View File

@ -278,7 +278,7 @@ export const createCashfreeOrder = onRequest({
customerPhone: customerPhone,
orderStatus: 'CREATED',
paymentGateway: 'Cashfree',
createdAt: admin.firestore.FieldValue.serverTimestamp(),
createdAt: new Date(),
...cashfreeResponse.data
});
@ -330,7 +330,7 @@ export const verifyCashfreePayment = onRequest({
await admin.firestore().collection('payment_orders').doc(orderId).update({
orderStatus: cashfreeResponse.data.order_status,
paymentDetails: cashfreeResponse.data,
updatedAt: admin.firestore.FieldValue.serverTimestamp()
updatedAt: new Date()
});
if (request.headers['x-webhook-source'] === 'cashfree') {