mpesa-mz-sdk
Version:
SDK para integração com a API M-Pesa de Moçambique
43 lines (42 loc) • 1.87 kB
JavaScript
;
// src/types.ts
Object.defineProperty(exports, "__esModule", { value: true });
exports.MPESA_ERROR_MESSAGES = void 0;
// --- Mapeamento de Códigos de Erro M-Pesa ---
exports.MPESA_ERROR_MESSAGES = {
// Códigos de Sucesso
'INS-0': 'Request processed successfully',
// Códigos de Erro da API M-Pesa (Documentação Oficial)
'INS-1': 'Internal Error',
'INS-2': 'Invalid API Key',
'INS-4': 'User is not active',
'INS-5': 'Transaction cancelled by customer',
'INS-6': 'Transaction Failed',
'INS-9': 'Request timeout',
'INS-10': 'Duplicate Transaction',
'INS-13': 'Invalid Shortcode Used',
'INS-14': 'Invalid Reference Used',
'INS-15': 'Invalid Amount Used',
'INS-16': 'Unable to handle the request due to a temporary overloading',
'INS-17': 'Invalid Transaction Reference. Length Should Be Between 1 and 20.',
'INS-18': 'Invalid TransactionID Used',
'INS-19': 'Invalid ThirdPartyReference Used',
'INS-20': 'Not All Parameters Provided. Please try again.',
'INS-21': 'Parameter validations failed. Please try again.',
'INS-22': 'Invalid Operation Type',
'INS-23': 'Unknown Status. Contact M-Pesa Support',
'INS-24': 'Invalid InitiatorIdentifier Used',
'INS-25': 'Invalid SecurityCredential Used',
'INS-26': 'Not authorized',
'INS-993': 'Direct Debit Missing',
'INS-994': 'Direct Debit Already Exists',
'INS-995': 'Customer\'s Profile Has Problems',
'INS-996': 'Customer Account Status Not Active',
'INS-997': 'Linking Transaction Not Found',
'INS-998': 'Invalid Market',
'INS-2001': 'Initiator authentication error.',
'INS-2002': 'Receiver invalid.',
'INS-2006': 'Insufficient balance',
'INS-2051': 'Invalid number', // MSISDN invalid - usando "Invalid number" para ser mais claro
'INS-2057': 'Language code invalid.'
};