Skip to content

Instantly share code, notes, and snippets.

exports.grocery_payment_new = async (req, res) => {
try {
const schema = Joi.object().keys({
allCart_id: Joi.array().min(1).required(),
deliveryType: Joi.string().required(),
address_id: Joi.string().optional(),
total_price: Joi.number().required(),
promo_code: Joi.string().allow("").optional(),
payment_mode: Joi.string().allow("").optional(),
db.suborderhistories.find({user_id: ObjectId("6167c38a10fa5e460f5cb672"),created_on: {$gte: ISODate("2025-01-01T00:00:00.000Z"),$lte: ISODate("2025-06-24T23:59:59.999Z")}},{ transid: 1, created_on: 1, isPlaced: 1, isCancelled: 1, isDelivered: 1, payment_mode: 1 }).sort({ created_on: -1 }).pretty()
{
"_id" : ObjectId("685401fb4650bd3f32bf8e48"),
"isPlaced" : true,
"isDelivered" : true,
"isCancelled" : false,
"transid" : "25061915262NX",
"created_on" : ISODate("2025-06-19T12:26:16.887Z"),
"payment_mode" : "Selcom Pay / Mastercard QR"
}
req body for createGoogleWalletClass ---- {
id: '3388000000022354692.otapp_cinema_LM2603451645',
issuerName: 'duka.direct',
localizedIssuerName: { defaultValue: { language: 'en-US', value: 'duka.direct' } },
heroImage: {
sourceUri: {
uri: 'https://duka-staging.s3.af-south-1.amazonaws.com/otapp/selcom-otapp-footer.png'
}
},
logo: {
req body for createGoogleWalletClass ---- {
id: '3388000000022354692.otapp_cinema_LM2603451645',
issuerName: 'duka.direct',
localizedIssuerName: { defaultValue: { language: 'en-US', value: 'duka.direct' } },
heroImage: {
sourceUri: {
uri: 'https://duka-staging.s3.af-south-1.amazonaws.com/otapp/selcom-otapp-footer.png'
}
},
logo: {
{
"status_code": 200,
"message": "Data send Success",
"response": [
{
"_id": "67ecdabaeddd4d4ea84f975c",
"status": true,
"UID": "",
"title": {
"en": "Mobile Money (Quick Top-Up)",
@meshv94
meshv94 / README.md
Created October 7, 2024 11:09 — forked from piyushgarg-dev/README.md
Kafka Crash Course