diff --git a/partner-simplepay.js b/partner-simplepay.js index 3b7000f..2f3f220 100644 --- a/partner-simplepay.js +++ b/partner-simplepay.js @@ -175,7 +175,7 @@ function _responseBodyHandler(responseBody, task) { const diag = _getPropertyFromObjectSafe(response.data, 'diag'); let balance = _getPropertyFromObjectSafe(response.data, 'balance'); - if (balance && aaa.updateBalance) { + if ((typeof balance === 'string') && balance && aaa.updateBalance) { balance = balance.replace(/\D/g, ''); if (balance) { aaa.updateBalance(balance);