SET
FOREIGN_KEY_CHECKS=0;

INSERT INTO sps_master_payment_modes (`master_payment_mode`, `location_id`, `area_id`, `created_by`, `updated_by`,
                                      `created_at`, `updated_at`, `deleted_at`, `master_payment_description`)
VALUES ('FASTag', 1, 1, 1, 0, '2022-12-13 16:50:07', '0000-00-00 00:00:00', NULL, 'It will accept money on FASTag');

CREATE TABLE `sps_fastag_entries`
(
    `id`                     bigint(20) NOT NULL AUTO_INCREMENT,
    `txn_id`                 varchar(100) NOT NULL,
    `fastag_id`              varchar(100) NOT NULL,
    `fastag_no`              varchar(100) NOT NULL,
    `cron_status`            int(10) DEFAULT 0,
    `tag_status`             varchar(10)  DEFAULT NULL,
    `vehicle_no`             varchar(50)  DEFAULT NULL,
    `exccode`                varchar(50)  DEFAULT NULL,
    `comvehicle`             varchar(50)  DEFAULT NULL,
    `used_for_payment`       int(10) DEFAULT NULL,
    `tag_signature_data_hex` varchar(255) DEFAULT NULL,
    `tag_vrn`                varchar(100) DEFAULT NULL,
    `issuer_bank_id`         varchar(100) DEFAULT NULL,
    `tag_v_class`            varchar(50)  DEFAULT NULL,
    `rfu`                    varchar(50)  DEFAULT NULL,
    `epc_id`                 varchar(100) DEFAULT NULL,
    `user_memory`            text         DEFAULT NULL,
    `tag_whitelist_status`   varchar(20)  DEFAULT NULL,
    `created_at`             datetime     DEFAULT NULL,
    `updated_at`             datetime     DEFAULT NULL,
    `deleted_at`             datetime     DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC;

ALTER TABLE `sps_settings`
    ADD COLUMN `fastag_program` varchar(512) DEFAULT NULL AFTER `deleted_at`;

ALTER TABLE `sps_settings`
    ADD COLUMN `geo_location` varchar(255) DEFAULT NULL AFTER `fastag_program`;

ALTER TABLE `sps_gate_configurations`
    ADD COLUMN `fastag` tinyint(3) NULL DEFAULT NULL AFTER `deleted_at`;

ALTER TABLE `sps_transactions`
    ADD COLUMN `fastag_id` varchar(50) DEFAULT NULL AFTER `notes`;

ALTER TABLE `sps_transactions`
    ADD COLUMN `exit_type` varchar(50) DEFAULT NULL AFTER `fastag_id`;

ALTER TABLE `sps_transactions`
    ADD COLUMN `entry_type` varchar(50) DEFAULT NULL AFTER `exit_type`;

ALTER TABLE `sps_transactions`
    ADD COLUMN `fastag_vehicle_no` varchar(50) DEFAULT NULL AFTER `entry_type`;


/* 15/05/2023 */

ALTER TABLE `sps_transactions`
    ADD COLUMN `fastag_pay` varchar(50) DEFAULT NULL COMMENT 'pending = ready for go fastag payment, cancel = transaction has been canceled by operator, detail should be on comment,\r\nsuccess = fastag payment success,\r\nfailure = fastag payment failed and detail is at comment' AFTER `entry_type`;

ALTER TABLE `sps_transactions`
    ADD COLUMN `fastag_comment` varchar(255) DEFAULT NULL AFTER `fastag_pay`;

ALTER TABLE `sps_transactions`
    ADD COLUMN `fastag_epc` varchar(255) DEFAULT NULL AFTER `fastag_pay`;

ALTER TABLE `sps_transactions`
    ADD COLUMN `fastag_tag_signature` varchar(255) DEFAULT NULL AFTER `fastag_pay`;

ALTER TABLE `sps_transactions`
    ADD COLUMN `fastag_exec_code` varchar(255) DEFAULT NULL AFTER `fastag_tag_signature`;

ALTER TABLE `sps_transactions`
    ADD COLUMN `fastag_exec_message` varchar(255) DEFAULT NULL AFTER `fastag_exec_code`;

ALTER TABLE `sps_transactions`
    ADD COLUMN `fastag_lane` varchar(255) DEFAULT NULL AFTER `fastag_pay`;

CREATE TABLE `sps_fastag_api_route_logs`
(
    `id`           int(10) unsigned NOT NULL AUTO_INCREMENT,
    `ip`           varchar(200) DEFAULT NULL,
    `url`          varchar(200) DEFAULT NULL,
    `method`       varchar(200) DEFAULT NULL,
    `request_body` longtext     DEFAULT NULL,
    `response`     longtext     DEFAULT NULL,
    `created_at`   datetime     DEFAULT NULL,
    `updated_at`   datetime     DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;


INSERT INTO `sps_payment_modes`(`id`, `payment_mode`, `master_id`, `parent_id`, `location_id`, `area_id`, `created_by`,
                                `updated_by`, `created_at`, `updated_at`, `deleted_at`, `payment_description`)
VALUES (8, 'FASTag', 4, 8, 0, 0, 0, 0, '2023-01-23 10:21:50', NULL, NULL, NULL);


UPDATE `sps_settings`
SET `fastag_program` = 'enabled',
    `geo_location`   = '19.0619647,72.7694815';


CREATE TABLE `sps_fastag_error_lists`
(
    `id`          bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `error_code`  varchar(191) COLLATE utf8_unicode_ci NOT NULL,
    `description` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
    `flag`        int(11) NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (1, '101', 'Version Empty or not 1.0', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (2, '102', 'Timestamp empty or not in ISO Format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (3, '103', 'orgId is not available in Database', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (4, '104', 'msgId is not in correct format or empty', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (5, '105', 'Txn Id is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (6, '106', 'TagId is not in correct format or empty', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (7, '107', 'TagId already present in Database', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (8, '108', 'Org Id is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (9, '109', 'SeqNum duplicate in a request', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (10, '110', 'Empty SeqNum or not numeric', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (11, '112', 'TID is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (12, '113', 'Vehicle Class is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (13, '114', 'Vehicle class not available in Database', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (14, '115', 'RegNo empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (15, '116', 'Bank ID is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (16, '118', 'Exception code is empty ', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (17, '119', 'Exception code not in Database or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (18, '122', 'Issue Date is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (19, '123', 'Issue Date should not be greater than current date', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (20, '124', 'OrgId is Inactive', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (21, '125', 'TagId is not present in Database', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (22, '126', 'Amount empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (23, '127', 'Plaza code empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (24, '131', 'VIN(Type field in Managetag) is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (25, '132', 'TagId not associated with issuer Bank', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (26, '133', 'Counter is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (27, '134', 'Not able to reach Database', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (28, '136', 'Not able to contact issuer', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (29, '138', 'Empty Request', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (30, '139', 'Head Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (31, '140', 'Transaction Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (32, '141', 'Note is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (33, '142', 'RefId is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (34, '143', 'RefUrl is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (35, '144', 'Txn Type is empty or not in the list of types', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (36, '145', 'Vehicle Tag is null ', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (37, '146', 'Inputs are null to UPDATE', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (38, '147', 'Request is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (39, '148', 'OP code is empty', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (40, '149', 'OP code is incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (41, '150', 'Lane Reader ID is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (42, '151', 'Error in insertion in table', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (43, '155', 'Exception code already mapped with TagId', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (44, '157', 'Given exception code not available in TagId to remove', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (45, '159', 'Last Fetch Time is greater than 24 hours or future time', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (46, '160', 'Last fetch time is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (47, '161', 'Risk Score Provider is empty or is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (48, '162', 'risk score type is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (49, '163', 'risk score value is empty is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (50, '164', 'TID ID not mapped with given tagId', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (51, '165', 'AVC not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (52, '166', 'Plaza name not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (53, '167', 'Plaza geocode is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (54, '168', 'Plaza type is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (55, '169', 'Lane Id is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (56, '170', 'Lane Directon is empty ot not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (57, '171', 'Reader Read time is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (58, '172', 'Reader Read Time cannot be more than txn time', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (59, '173',
        'Maximum days to push older transactions exceeds(defaulf-Current Time is more than 3 days from reader read time)',
        0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (60, '174', 'orgTxnId is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (61, '175', 'Amount should be zero as tagId is in exemption Code', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (62, '176', 'Cannot initiate TXN as Tag is in Black List or Low Balance List', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (63, '177', 'Duplicate ExcCode', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (64, '178', 'Plaza not available in Database', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (65, '179', 'Plaza not associated with Acquirer ID', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (66, '180', 'Plaza type is not same as available in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (67, '181', 'Lane attributes should be empty in case of Plaza type as Parking', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (68, '182', 'Parking floor is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (69, '183', 'Parking zone is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (70, '184', 'Slot Id is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (71, '185', 'Reader Id is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (72, '186', 'VEHICLE DETAILS are not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (73, '187', 'Vehicle Class is not associated with tagId', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (74, '188', 'Reg no. is not associated with tagId', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (75, '189', 'Status(A/I) is not associated with tagId.', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (76, '190', 'issueDate is not associated with tagId', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (77, '191', 'ExcCode is not associated with tagId', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (78, '193', 'Payer addr is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (79, '194', 'Payer Name is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (80, '195', 'Payer type should be \"PERSON\"', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (81, '196', 'Currency is empty or not in correct f11ormat', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (82, '197', 'Payee Addr is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (83, '198', 'Avc Not in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (84, '199', 'Payee Name is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (85, '200', 'Payee Type should be MERCHANT', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (86, '201', 'Transaction ID+Merchant ID+Acquirer ID should be unique for a transaction', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (87, '202', 'Meta Element is missing', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (88, '203', 'Amount should be zero if txn type is NON_FIN', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (89, '204', 'TID should be Unique', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (90, '205', 'Future Timestamp should not be acceptable', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (91, '206', 'Not allowed to use particular service', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (92, '207', 'Exception Code is already added by other bank', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (93, '208', 'No privledges to add exception Code', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (94, '209', 'TID Verified is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (95, '210', 'Sign Data and Public Key CVV is mandatory if TID verified is netc tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (96, '211', 'Sign Data is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (97, '212', 'Public Key CVV is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (98, '213', 'Sign Auth is not valid', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (99, '214', 'procRestrictionResult is not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (100, '215', 'Vehicle Auth is not valid', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (101, '216', 'Txn Counter is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (102, '217', 'Txn Status is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (103, '218', 'Txn Amount should be zero if txn status is FAILED', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (104, '219', 'Parking details should be empty if Plaza Type is not Parking', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (105, '220', 'Payee Address is incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (106, '221', 'Heart Beat Msg Type is not in predefined types', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (107, '222', 'Heart Beat msg Acquirer Id is not matched with OrgId\'s acquirer Id', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (108, '223', 'Parking status is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (109, '224', 'Available slot is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (110, '225', 'Lane status is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (111, '231', 'Comvehicle is Empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (112, '232', 'TID is not in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (113, '233', 'Vehicle Reg No not in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (114, '234', 'Any one input either tagid or TID or vehicleRegNo should be present for Request Tag Details', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (115, '235', 'Plaza Subtype is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (116, '236', 'Plaza Subtype is not same as available in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (117, '237', 'Commercial Vehicle Flag is not same in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (118, '238', 'IIN from TagId is not matching with orgid\'s IIN',
        0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (119, '239', 'Only one input is allowed either tagid or TID or vehicleRegNo', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (120, '240', 'Vehicle RegNo or Vin or EngineNumber Already Registered with some other TagId.', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (121, '241', 'One or more attribute is missing in Head Element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (122, '242', 'One or more attribute is missing in Txn Element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (123, '243', 'One or more attribute is missing in TagList', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (124, '244', 'One or more attribute is missing in Meta Element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (125, '245', 'One or more attribute is missing in Merchant Element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (126, '246', 'One or more attribute is missing in Vehicle Element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (127, '247', 'One or more attribute is missing in Payer Element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (128, '248', 'One or more attribute is missing in Payee Element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (129, '249', 'Payer Address is incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (130, '250', 'One or more attribute is missing in Exception tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (131, '261', 'Signature is not found in request', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (132, '262', 'Bank certificate is not found', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (133, '263', 'Signature is  invalid', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (134, '264', 'IIN from Tag Id doesn\'t match payer IIN', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (135, '265', 'Participant is not available with given issuer ID', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (136, '266', 'Merchant Element not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (137, '267', 'Lane Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (138, '268', 'Parking Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (139, '269', 'Reader Verification Result Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (140, '270', 'Payee Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (141, '271', 'Payer Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (142, '272', 'Amount Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (143, '273', 'Riskscores Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (144, '274', 'Score Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (145, '275', 'Vehicle Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (146, '276', 'Vehicle Details Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (147, '277', 'TagList Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (148, '278', 'Tag Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (149, '279', 'ExceptionList Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (150, '280', 'Exception Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (151, '281', 'Amount should not be zero if txn Type is Credit or Debit', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`) VALUES (152, '282', 'ICICI Unregistered Tag doesn\'t match ICICI IIN',
        0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (153, '283', 'ICIC IIN is not defined', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (154, '284', 'Signature algorithm is not correct ', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (155, '285', 'Digest algorithm is not correct', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (156, '286', 'Queue Full', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (157, '287', 'Unreadable XML', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (158, '288', 'OrgTxnId cannot be null in case txn type is CREDIT', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (159, '289', 'Cannot Intiate same TagId for Same Exception in Single Request.', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (160, '290', 'Credit Happened Already for Specified TxnId.', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (161, '291', 'Credit amount should not be greater than or equal to debit amount.', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (162, '292', 'Credit Reader read time should not be less than Debit Reader read time', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (163, '293', 'No Txn happened for debit in last three days', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (164, '294', 'SignData should be mandatory for version 2.0', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (165, '295', 'No Matching ECC PublicKey found for Issuer IIN and Key Index', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (166, '296', 'Tag Signature Verification Failed', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (167, '297', 'PublicKey CVV of Input Message NOT matched with DB value', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (168, '299', 'Txn Status Should Not Be Failed', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (169, '301', 'One or more attribute is missing in Status Element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (170, '302', 'Status Element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (171, '303', 'Incorrect format for Transaction Date', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (172, '304', 'Transaction Date is of future date', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (173, '305', 'The given combination for a particular transaction doesn\'t exist', 0);
INSERT INTO `sps_fastag_error_lists` (`id`, `error_code`, `description`, `flag`) VALUES (174, '306', 'Transaction ID doesn\'t exist in Transaction Master table',
        0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (175, '307', 'TxnId in Status element is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (176, '308', 'Acquirer ID is empty or not in correct format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (177, '309', 'Transaction Status Request List element is missing', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (178, '310', 'Duplicate Status element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (179, '311', 'Status tag size exceeds that of system parameter value', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (180, '312', 'Participant List element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (181, '313', 'Participant element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (182, '314', 'Attribute missing in Participant element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (183, '315', 'ShortCode in Participant element is empty or incorrect format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (184, '316', 'ShortCode in Participant element is not in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (185, '317', 'Merchant tag size exceeds that of system parameter value', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (186, '318', 'MerchantList element is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (187, '319', 'Merchant Id and Merchant Type combination not in Database', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (188, '320', 'Duplicate Merchant element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (189, '321', 'Specific Merchant is not allowed', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (190, '322', 'Merchant ID ALL is not allowed', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (191, '324', 'Participant tag size exceeds that of system parameter value', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (192, '325', 'Duplicate Participant Element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (193, '326', 'Specific Participant Is not allowed', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (194, '327', 'Participant shortcode ALL is not allowed', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (195, '333', 'Destination does not send response within SLA', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (196, '500', 'Amount is more than maximum amount for vehicle class', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (197, '888', 'Deemed accepted with issuer liability', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (198, '999', 'Deemed accepted with acquirer liability', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (199, '335', 'Invalid Meta Name', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (200, '336', 'Invalid Meta Value', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (201, '337', 'Meta TagSize Exceeds That Of SystemParamValue', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (202, '339', 'Risk TagSize Exceeds That Of SystemParamValue', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (203, '340', 'One or more attribute is missing in Score Element', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (204, '341', 'Tag not mapped with Low Balance', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (205, '342', 'Tag in Low Balance not more than \'30\' or \' N\' days', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (206, '343', 'Tag cannot be removed from LowBalance  while in HotList', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (207, '344', 'New tag cannot register for Vehicle which are in Blacklist or Hotlist', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (208, '345', 'New tag cannot be registered with the exception code Hotlist ', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (209, '346', 'Inactive Vehicle Class', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (210, '500', 'Transaction amount is more than the defined threshold limit for the VC', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (211, '501', 'Command Name is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (212, '502', 'Command Type is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (213, '503', 'Command Id is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (214, '504', 'NumParams is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (215, '505', 'Callback is incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (216, '506', 'Param Name is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (217, '507', 'Param Type is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (218, '508', 'Param Value is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (219, '509', 'Param Length is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (220, '510', 'NumObject is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (221, '511', 'Object Name is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (222, '512', 'Object Type is incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (223, '513', 'NumItems is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (224, '514', 'Item Name is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (225, '515', 'Item Value is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (226, '516', 'Item Type is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (227, '517', 'Item Length is incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (228, '518', 'Result TimeStamp is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (229, '519', 'Result Status is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (230, '520', 'Result Code is incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (231, '521', 'Source Address is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (232, '522', 'Source Name is incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (233, '523', 'Source Type is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (234, '524', 'Destination Address is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (235, '525', 'Destination Name is incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (236, '526', 'Destination Type is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (237, '527', 'Command Tag is missing', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (238, '528', 'Param Tag is missing', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (239, '529', 'ObjectList Tag is missing', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (240, '530', 'Object Tag is missing', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (241, '531', 'Item Tag is missing', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (242, '532', 'Result Tag is missing', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (243, '533', 'Source Tag is missing', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (244, '534', 'Destination Tag is missing', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (245, '535', 'One or more attribute is missing in Command Tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (246, '536', 'One or more attribute is missing in Param Tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (247, '537', 'One or more attribute is missing in ObjectList Tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (248, '538', 'One or more attribute is missing in Object Tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (249, '539', 'One or more attribute is missing in Item Tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (250, '540', 'One or more attribute is missing in Result Tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (251, '541', 'One or more attribute is missing in Source Tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (252, '542', 'One or more attribute is missing in Destination Tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (253, '543', 'Version is not allowed for the service', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (254, '544', 'Source Address IIN/AID is not matching with Source Type', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (255, '545', 'Netc Reference Id is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (256, '546', 'Destination Error Code is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (257, '561', 'NetcRefId is not there in DB or NetcRefId is Not in Pending State', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (258, '562', 'Source id (IIN/AID) + Destination id (IIN/AID) + Txn id should be unique for the request', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (259, '563', 'Txn Id in the Response is not Matching with Txn Id of NetcRefId in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (260, '564', 'XML Score Value is not matching corresponding request id score value in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (261, '565', 'Given Command Id is Not in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (262, '566', 'Command Name is Not Matched with DB value for the given Command Id', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (263, '567', 'Command Type is Not Matched with DB value for the given Command Id', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (264, '568', 'NumParams is not matching with Param Count for the combination (Command Id + Txn Type)', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (265, '569', 'Param Name mismatch with the given command id in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (266, '570', 'No Params are mapped for the given (Command id + type)', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (267, '571', 'ObjectList is not available for Param Type XML', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (268, '572', 'Objects size is not matching with numObject value or Object tag is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (269, '573', 'Object Type is not ARRAY', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (270, '574', 'Item type is not matching with the DB Value', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (271, '575', 'Result tag Timestamp is greater then NETC Server time stamp', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (272, '578', 'For Txn Type RQST, both source & destination are matching', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (273, '579', 'For Txn Type RQST, Destination address is not matching with Type', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (274, '582', 'For Txn Type RESP, Source details are not matching with DB Destination details', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (275, '583', 'For Txn Type RESP, Destination details are not matching with DB Source details', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (276, '584', 'No. of Items mapped in DB for (Param + Txn Type) is not same to the Items List in the message', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (277, '585', 'No Items are mapped for the given (Param + Txn type)', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (278, '589', 'Param Value pattern is not matching with Param Type', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (279, '590', 'Param Type is not matching with corresponding Param Name in the DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (280, '591', 'Param Length value is not matching with its Value length', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (281, '592', 'Item Value pattern is not matching with Item Type', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (282, '593', 'Item Length value is not matching with its Value length', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (283, '594', 'Item Name is not matching with any of the DB values or duplicate item names', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (284, '595', 'Items size is not matching with numItems value or Item tag is not available', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (285, '596', 'Txn time is ahead of transmission time', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (286, '597', 'NumParams is not matching with Param Tag size of XML', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (287, '600', 'DestSentInvalidResponse', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (288, '601', 'DestinationIsNotReachable', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (289, '603', 'InvalidNetcRefId', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (290, '604', 'Invalid VIN', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (291, '605', 'Invalid Engine Number', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (292, '606', 'VIN/Engine Number cannot be empty', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (293, '607', 'No records found for provided VIN and Engine Number combination', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (294, '702', 'Registered Vehicle is incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (295, '703', 'State is empty or incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (296, '704', 'Tag Descriptor incorrect', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (297, '705', 'Tag Descriptor is Empty', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (298, '706', 'Tag Descriptor is not in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (299, '707', 'State is Empty', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (300, '708', 'State is not in DB', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (301, '709', 'VIN is Empty', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (302, '710', 'Engine Number is Empty', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (303, '711', 'Registered Vehicle is Empty', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (304, '712', 'If Vin,RegNo and EngineNumber exist then tag Descriptor should 02', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (305, '713', 'If Vin,RegNo and EngineNumber not exist then tag Descriptor should 01', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (306, '714', 'Exception code is null or invalid for IHMCL Tags', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (307, '715', 'Same Vin or EngineNumber or ReqNo already exist', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (308, '716', 'Participant not allowed to register IHMCL tags', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (309, '717', 'IIN in Tag ID is not matching IHMCL IIN', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (310, '718', 'Exception code not allowed for IHMCL Tags', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (311, '719', 'Tag ID or VRN is already registered in Mapper', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (312, '720', 'Bank is not allowed to Register IHMCL Tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (313, '721', 'IHMCL tag is not in IHMCL Master', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (314, '722', 'IHMCL TID Mismatch ', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (315, '723', 'IHMCL Vehicle Class code Mismatch', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (316, '724', 'IHMCL Vehicle Regn Number Mismatch', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (317, '725', 'IHMCL Commercial Vehicle Mismatch', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (318, '726', 'IHMCL Tag not registered', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (319, '727', 'IHMCL Tag cannot be registered with the exception code provided', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (320, '728', 'IHMCL tag is not in DB(or)IHMCL tag is already registered in Mapper', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (321, '729', 'IHMCL Registered tag cannot be added with exempted code', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (322, '800', 'Deemed Declined as the Issuer is not reachable.', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (323, '420', 'IIN in Tag ID is not matching Ecom IHMCL IIN', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (324, '367', 'Ecom Tag ID should be in BlackList', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (325, '368', 'No Sufficient Consent Details', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (326, '369', 'Tag is BlackListed by non IHMCL Participant', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (327, '370', 'Not able to contact acquirer', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (328, '371', 'Response MsgId is not matching with Request MsgId', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (329, '372', 'Response TxnId is not matching with Request TxnId', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (330, '373', 'Response Note is not matching with Request Note ', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (331, '374', 'Response OrgTxnId is not matching with Request OrgTxnId ', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (332, '375', 'Response RefId is not matching with Request RefId ', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (333, '376', 'Response Type is not matching with Request Type ', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (334, '377', 'If status is Y then respcode should be 000', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (335, '378', 'Status should be Y or N', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (336, '379', 'No consentDetails tag is present', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (337, '380', 'Some attribute is missing in ConsentDetails tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (338, '381', 'Issuer not responded with in SLA', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (339, '382', 'NPCI Ref ID attribute is missing  ', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (340, '383', 'NPCI Ref Id Not Availible in DataBase or not Associated with this participant', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (341, '384', 'NPCI Ref ID is  should not be empty or not as per format', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (342, '385', 'if tag is in 01 or 04 or 05, we cannot add it into 02', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (343, '386', 'if tag is in 01 or 02 or 05, we cannot add it into 04', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (344, '803', 'MerchantDetailsInvalid', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (345, '802', 'MerchantDetailsSizeInvalid', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (346, '801', 'MerchantTypeSubtypeInvalid', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (347, '804', 'IHMCL Tag cannot be registered until the VIN is updated to VRN', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (348, '666', 'Issuer is Unavailable', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (349, '667', 'Issuer is Unavilable for Unregistered tag', 0);
INSERT INTO `sps_fastag_error_lists`(`id`, `error_code`, `description`, `flag`)
VALUES (350, '000', 'Success', 0);


ALTER TABLE `sps_settings`
    ADD COLUMN `fastag_hold_time` int(11) DEFAULT '0' AFTER `geo_location`;

ALTER TABLE `sps_gate_configurations`
    ADD COLUMN `fastag_gate_id` varchar(20) NULL DEFAULT NULL AFTER `fastag`;

ALTER TABLE `sps_gate_configurations`
    ADD COLUMN `fastag_floor_id` int(11) NULL DEFAULT NULL AFTER `fastag_gate_id`;

ALTER TABLE `sps_gate_configurations`
    ADD COLUMN `fastag_direction` varchar(20) NULL DEFAULT NULL AFTER `fastag_floor_id`;

ALTER TABLE `sps_transactions`
    MODIFY COLUMN `fastag_pay` varchar (50) DEFAULT NULL COMMENT 'pending = ready for go fastag payment, cancel = transaction has been canceled by operator, detail should be on comment, success = fastag payment success, inprogress = fastag payment inprogress, failure = fastag payment failed and detail is at comment' AFTER `entry_type`;

UPDATE `sps_settings`
SET `fastag_program` = 'enabled',
    `geo_location`   = '19.0619647,72.7694815';

ALTER TABLE `sps_transactions`
    ADD COLUMN `fastag_messageId` varchar(100) DEFAULT NULL AFTER `fastag_pay`;

INSERT INTO `sps_menu`(`menu_item`, `menu_url`, `menu_class`, `parent_menu_id`, `action`, `order`, `status`,
                                 `location_id`, `area_id`, `created_by`, `created_at`, `updated_at`, `deleted_at`,
                                 `updated_by`)
VALUES ('fastag_report', 'admin/reports/fastag_report', 'menu', 46, '', 11.08, 1, 0, 0, 0, '2017-04-13 07:15:53',
        '2016-12-22 08:18:13', NULL, 0);


INSERT INTO sps_menu_action_mapping (menu_id, action_id, area_id, location_id, created_by, updated_by)
SELECT sps_menu.id, 1, 1, 1, 0, 0
FROM sps_menu
WHERE sps_menu.menu_item = 'fastag_report';

INSERT INTO sps_access_rights (role_id, menu_id, action_id, area_id, location_id, created_by, updated_by)
SELECT 1, sps_menu.id, 1, 1, 1, 0, 0
FROM sps_menu
WHERE sps_menu.menu_item = 'fastag_report';

-- 11-07-2023
CREATE TABLE `sps_fastag_block_vehicles` (
                                             `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
                                             `vehicle_no` varchar(191) NULL,
                                             `tid` varchar(191) NULL,
                                             `tag_id` varchar(191) NULL,
                                             PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;


--- 18-07-2023

INSERT INTO sps_access_rights (role_id, menu_id, action_id, area_id, location_id, created_by, updated_by)
SELECT 1, sps_menu.id, 6, 1, 1, 0, 0
FROM sps_menu
WHERE sps_menu.menu_item = 'fastag_report';

INSERT INTO sps_menu_action_mapping (menu_id, action_id, area_id, location_id, created_by, updated_by)
SELECT sps_menu.id, 6, 1, 1, 0, 0
FROM sps_menu
WHERE sps_menu.menu_item = 'fastag_report';

-- For FASTAg Eod Report
INSERT INTO sps_eod_report_select (`eod_report_name`, `status`, `area_id`, `location_id`, `eod_reportvise_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES ('fastag_summary_report', 1, 1, 1, 15.1, 1, 0, '2022-12-20 07:44:15', '2022-12-20 07:44:15', NULL);


-- EOD Transaction Cancellation Detail
UPDATE `sps_eod_report_select` SET `eod_report_name` = 'transaction_cancellation_detailed', `status` = 1, `area_id` = 1, `location_id` = 1, `eod_reportvise_id` = 18, `created_by` = 1, `updated_by` = 0, `created_at` = '2017-11-01 16:11:28', `updated_at` = '2023-09-04 12:33:07', `deleted_at` = NULL WHERE `eod_report_name` = 'transaction_cancellation';

-- EOD Transaction Cancellation Summary
INSERT INTO sps_eod_report_select (`eod_report_name`, `status`, `area_id`, `location_id`, `eod_reportvise_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES ( 'transaction_cancellation_summary', 1, 1, 1, 18.1, 1, 0, '2017-11-01 16:11:28', '2023-09-04 12:33:07', NULL);


-- EOD Overnight Vehicle Summary
INSERT INTO `sps_eod_report_select` (`eod_report_name`, `status`, `area_id`, `location_id`, `eod_reportvise_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES ('overnight_vehicle_report_summary', 1, 1, 1, 22.1, 1, 0, '2017-11-01 16:11:28', '2023-08-21 20:13:23', NULL);

-- EOD Overnight Vehicle Detail
UPDATE `sps_eod_report_select` SET `eod_report_name` = 'overnight_vehicle_report_detailed', `status` = 1, `area_id` = 1, `location_id` = 1, `eod_reportvise_id` = 22, `created_by` = 1, `updated_by` = 0, `created_at` = '2017-11-01 16:11:28', `updated_at` = '2023-08-21 20:13:23', `deleted_at` = NULL WHERE `eod_report_name` = 'overnight_vehicle_report';



SET
FOREIGN_KEY_CHECKS=1;

