JS error on balance.init ()

  • Uncaught TypeError: cannot use the 'in' operator to search for 'debug' in undefined
  • a.balanced.initbalanced.js: 1 https://js.balancedpayments.com/v1/balanced.js
  • (anonymous function)

    <script type="text/javascript" src=" https://js.balancedpayments.com/v1/balanced.js"></script>
    <script>
    //balanced.init('/v1/marketplaces/TEST-MP798-194-2357');
    //balanced.init('/marketplaces/TEST-MP798-194-2357');
    balanced.init('TEST-MP798-194-2357');
    </script>
    

Getting the same error for each of the different calls. Is my URI invalid?

+3
source share
1 answer

This is a documentation error at our end. There should be a second optional parameter, but now required.

As you understand

balanced.init('YOUR-MARKETPLACE-URI', {}); // works
balanced.init('YOUR-MARKETPLACE-URI', {'debug': true}); // turns on debugging

Hope this helps.

+2
source

All Articles