-- Provider IDs: 4 for YSP (Bank), 0 for jPOS (Internal)

-- Baseline data for YSP (Provider #4)
INSERT INTO error_messages (error_code, provider, error_message) VALUES
('00', 4, 'APPROVED'),
('01', 4, 'REFER TO CARD ISSUER'),
('02', 4, 'REFER TO CARD ISSUER'),
('03', 4, 'INVALID MERCHANT'),
('04', 4, 'PICK UP CARD'),
('05', 4, 'DO NOT HONOR'),
('06', 4, 'ERROR'),
('07', 4, 'PICK UP CARD'),
('10', 4, 'PARTIAL APPROVED'),
('11', 4, 'APPROVED VIP'),
('12', 4, 'INVALID TRANSACTION'),
('13', 4, 'INVALID AMOUNT'),
('14', 4, 'INVALID ACCOUNT NUMBER'),
('15', 4, 'NO SUCH ISSUER'),
('19', 4, 'RE-ENTER TRANSACTIONS'),
('25', 4, 'UNABLE TO LOCATE RECORD IN FILE'),
('30', 4, 'FORMAT ERROR'),
('39', 4, 'NO CREDIT ACCOUNT'),
('41', 4, 'LOST CARD, PICK UP'),
('43', 4, 'STOLEN CARD, PICK UP'),
('51', 4, 'INSUFFICIENT FUNDS'),
('52', 4, 'NOT CHECKING ACCOUNT'),
('53', 4, 'NO SAVINGS ACCOUNT'),
('54', 4, 'EXPIRED CARD'),
('55', 4, 'INCORRECT PIN'),
('57', 4, 'TRANSACTION NOT PERMITTED TO CARDHOLDER'),
('58', 4, 'TRANSACTION NOT ALLOWED AT TERMINAL'),
('61', 4, 'Txn Declined, Use Contact'),
('62', 4, 'RESTRICTED CARD'),
('63', 4, 'SECURITY VIOLATION'),
('64', 4, 'INVALID ACCOUNT'),
('65', 4, 'EXCEEDS WITHDRAWAL FREQUENCY LIMIT'),
('75', 4, 'PIN TRY LIMIT EXCEEDED'),
('76', 4, 'UNSOLICITED REVERSAL'),
('79', 4, 'ALREADY REVERSED'),
('80', 4, 'INVALID DATE'),
('81', 4, 'SECURITY VIOLATION'),
('82', 4, 'INCORRECT CVV'),
('83', 4, 'UNABLE/CANNOT VERIFY PIN'),
('85', 4, 'DATABASE ERROR'),
('86', 4, 'UNABLE/CANNOT VERIFY PIN'),
('91', 4, 'ISSUER SWITCH INOPERATIVE'),
('92', 4, 'NETWORK ROUTING ERROR'),
('94', 4, 'DUPLICATE TRANSMISSION'),
('95', 4, 'SYSTEM MALFUNCTION');

-- Internal jPOS Codes (Provider #0)
INSERT INTO error_messages (error_code, provider, error_message) VALUES
('96', 0, 'INTERNAL SYSTEM MALFUNCTION'),
('82', 0, 'INTERNAL DATABASE ERROR'),
('78', 0, 'MIDDLEWARE SYSTEM ERROR'),
('83', 0, 'ACQUIRER HOST TIMEOUT'),
('76', 0, 'INVALID POS MAPPING/TERMINAL'),
('77', 0, 'INVALID ACQUIRER CONFIG');
