config.sample.json 8.28 KB
{
    "handler_name": "MKIOS-TEST",
    "pull_interval_ms": 300,
    "partner": {
        "pin": "",
        "modem": {
            "dev": ""
        }
    },
    "products": [
        "_TST1",
        "_DUMMY5",
        "_DUMMY10",
        "TSEL5",
        "TSEL10",
        "TSEL15",
        "TSEL20",
        "TSEL25",
        "TSEL40",
        "TSEL50",
        "TSEL100",
        "TSEL150",
        "TSEL200"

    ],
    "remote_products": {
        "TST1": "*777*<DESTINATION>*5*<PIN>#,5000",
        "DUMMY5": "*369*3*<DESTINATION>*5*<PIN>#,5000",
        "_DUMMY10": "*369*3*<DESTINATION>*10*<PIN>#,10000",
        "_DUMMY5": "*369*2*<DESTINATION>*1*101*<PIN>#,2GBCOMBO",
        "DUMMY10": "*777*<DESTINATION>*025*<PIN>#,10000",
        "TSEL5": "*777*<DESTINATION>*5*<PIN>#,5000",
        "TSEL10": "*777*<DESTINATION>*10*<PIN>#,10000",
        "TSEL15": "*777*<DESTINATION>*10*<PIN>#,15000",
        "TSEL20": "*777*<DESTINATION>*020*<PIN>#,20000",
        "TSEL25": "*777*<DESTINATION>*025*<PIN>#,25000",
        "TSEL40": "*777*<DESTINATION>*040*<PIN>#,40000",
        "TSEL50": "*777*<DESTINATION>*050*<PIN>#,50000",
        "TSEL100": "*777*<DESTINATION>*0100*<PIN>#,100000",
        "TSEL150": "*777*<DESTINATION>*0150*<PIN>#,150000",
        "TSEL200": "*777*<DESTINATION>*0200*<PIN>#,200000"

    },
    "ussd_parser": {
        "destination": [
            { "pattern": "Transaksi ke (\\d+) pada" },
            { "pattern": "Pembelian 1 buah voucher <.+?> senilai <\\d+> untuk <(\\d+)" },
            { "pattern": "Transaksi bulk <\\d+ IDR> untuk <\\d+" }
        ],
        "product": [
            { "pattern": "senilai SimPATI: (\\d+) " },
            { "pattern": "senilai <\\d+> untuk"},
            { "pattern": "Transaksi bulk <(\\d+) IDR>"}
        ],
        "sn": [
            { "pattern": "SN <(\\d+)>"}
        ],
        "rc": [
            { "pattern": "berhasil", "rc": "00"},
            { "pattern": "Nomer tidak ditemukan", "rc": "14" },
            { "pattern": "Nomer tdk ditemukan", "rc": "14" },
            { "pattern": "dalam blacklist", "rc": "14" },

            { "pattern": "sistem sedang sibuk", "rc": "90" },
            { "pattern": "tidak dapat mengisi", "rc": "40" },
            { "pattern": "telah melebihi batas pembelian", "rc": "40" },
            { "pattern": "tidak dapat membelikan", "rc": "40" },
            { "pattern": "tidak bisa mengulang", "rc": "40" },
            { "pattern": "tidak dapat mendaftar paket", "rc": "40" },
            { "pattern": "yg anda miliki telah habis", "rc": "40" },
            { "pattern": "nomor yang anda isi telah terkunci", "rc": "14" },
            { "pattern": "tidak dapat kami proses", "rc": "40" },
            { "pattern": "sisa pulsa dari pengisian pulsa telah melewati batas limit", "rc": "40" },
            { "pattern": "kode akses tidak sesuai dengan tipe kartu", "rc": "40" },
            { "pattern": "belum bisa diproses", "rc": "40" },
            { "pattern": "tidak memungkinkan untuk diisi ulang pada saat ini", "rc": "40" },
            { "pattern": "stock voucher yang diminta tidak mencukupi", "rc": "12" },
            { "pattern": "tidak dapat dilakukan", "rc": "40" },
            { "pattern": "Nmr plg ditolak", "rc": "14" },
            { "pattern": "Nmr expired atau over limit", "rc": "14" },
            { "pattern": "Nmr plg exp atau pulsa over", "rc": "14" },
            { "pattern": "Pulsa over kuota", "rc": "40" },
            { "pattern": "Nmr plg exp", "rc": "14" },
            { "pattern": "Kode Paket yang Anda masukkan tidak tersedia", "rc": "12" },

            { "pattern": "Maaf,", "rc": "40" },
            { "pattern": "Gagal", "rc": "40" },
            { "pattern": "gagal", "rc": "40" }
        ],
        "stock": {
            "product": [
                { "pattern": "Stok anda (.+?)=" }
            ],
            "balance": [
                { "pattern": "Stok anda .+?=(\\d+)" }
            ]
        }
    },
    "sms_parser": {
        "allowed_sender": [
            "MKIOS",
            "3636"
        ],
        "destination": [
            { "pattern": "Isi ulang paket Flash (\\d+) pd .+? .+? berhasil. Voucher senilai Rp\\.\\d+\\. Nomor seri \\d+"},
            { "pattern": "Isi ulang (\\d+) pd", "prefix": "0" },
            { "pattern": "Transaksi ke (\\d+) pada", "prefix": "0" },
            { "pattern": "Pembelian 1 buah voucher <.+?> senilai <\\d+> untuk <(\\d+)", "prefix": "0" },
            { "pattern": "Transaksi bulk <\\d+ IDR> untuk <\\d+", "prefix": "0" }
        ],
        "product": [
            { "pattern": "Isi ulang paket Flash \\d+ pd .+? .+? berhasil. Voucher senilai Rp\\.(\\d+)\\. Nomor seri \\d+"},
            { "pattern": "Voucher SimPATI senilai (.+?)\\." },
            { "pattern": "senilai SimPATI: (\\d+) " },
            { "pattern": "senilai <\\d+> untuk"},
            { "pattern": "Transaksi bulk <(\\d+) IDR>"}
        ],
        "trx_date": [
            { "pattern": "Isi ulang paket Flash \\d+ pd (.+?) .+? berhasil. Voucher senilai Rp\\.\\d+\\. Nomor seri \\d+"},
            { "pattern": "Isi ulang \\d+ pd\\s+(.+?) \\d" },
            { "pattern": "Transaksi ke \\d+ pada\\s+(.+?) \\d" }
        ],
        "sn": [
            { "pattern": "Nomor seri (\\d+)"},
            { "pattern": "SN (\\d+)"},
            { "pattern": "SN <(\\d+)>"}
        ],
        "rc": [
            { "pattern": "berhasil", "value": "00"},
            { "pattern": "Nomer tidak ditemukan", "value": "14" },
            { "pattern": "dalam blacklist", "value": "14" },
            { "pattern": "gagal", "value": "40"}
        ],
        "stock": {
            "product": [
                { "pattern": "stock Anda saat ini (.+?)=" },
                { "pattern": "Sisa stok (.+?)=" },
                { "pattern": "Stok anda (.+?)=" },
                { "pattern": "voucher (bulk) anda yang tersedia:"},
                { "pattern": "Stok Anda setelah pengisian adalah <\\d+ (IDR)>."}
            ],
            "balance": [
                { "pattern": "stock Anda saat ini .+?=(\\d+)" },
                { "pattern": "Sisa stok .+?=(\\d+)" },
                { "pattern": "Stok anda .+?=(\\d+)" },
                { "pattern": "voucher bulk anda yang tersedia:\\s+(\\d+) IDR" },
                { "pattern": "Stok Anda setelah pengisian adalah <(\\d+) IDR>." }
            ],
            "multistock": {
                "must_have_pattern": "Stok voucher Anda yang tersedia: SimPATI",
                "pattern": "V\\d+=\\d+",
                "flags": "g",
                "separator": "="
            }
        }
    },
    "remote_product_alias": {
        "bulk": "BULK",
        "IDR": "BULK",
        "1rb": "1000",
        "5rb": "5000",
        "10rb": "10000",
        "15rb": "15000",
        "20rb": "20000",
        "25rb": "25000",
        "40rb": "40000",
        "50rb": "50000",
        "80rb": "80000",
        "100rb": "100000",
        "150rb": "150000",
        "200rb": "200000",
        "300rb": "300000",
        "500rb": "500000",
        "1jt": "1000000",
        "1K": "1000",
        "5K": "5000",
        "10K": "10000",
        "15K": "15000",
        "20K": "20000",
        "25K": "25000",
        "40K": "40000",
        "50K": "50000",
        "80K": "80000",
        "100K": "100000",
        "150K": "150000",
        "200K": "200000",
        "300K": "300000",
        "500K": "500000",
        "1000K": "1000000",
        "1": "1000",
        "5": "5000",
        "10": "10000",
        "15": "15000",
        "20": "20000",
        "25": "25000",
        "40": "40000",
        "50": "50000",
        "80": "80000",
        "100": "100000",
        "150": "150000",
        "200": "200000",
        "300": "300000",
        "500": "500000",
        "1000": "1000000",
        "V1": "1000",
        "V5": "5000",
        "V10": "10000",
        "V15": "15000",
        "V20": "20000",
        "V25": "25000",
        "V40": "40000",
        "V50": "50000",
        "V80": "80000",
        "V100": "100000",
        "V150": "150000",
        "V200": "200000",
        "V300": "300000",
        "V500": "500000",
        "V1000": "1000000"
    },
    "control_panel": {
        "listen_port": "37201",
        "url": "http://localhost:37201/"
    },
    "apiserver": {
        "port": "37202",
        "apikey": "ccc558f508c289078f7d652458921aad66cf9b1b",
        "url": "http://localhost:37202/apikey/ccc558f508c289078f7d652458921aad66cf9b1b"
    }
}