JS error on balanced.init()

谁说胖子不能爱 提交于 2019-12-10 22:42:27

问题


  1. Uncaught TypeError: Cannot use 'in' operator to search for 'debug' in undefined
  2. a.balanced.initbalanced.js:1https://js.balancedpayments.com/v1/balanced.js
  3. (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 on each of the different calls. Is my URI incorrect?


回答1:


This is a documentation bug on our end. There should be a second optional parameter, but right now it's required.

Like you have figured out,

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

Hope this helps.



来源:https://stackoverflow.com/questions/10249710/js-error-on-balanced-init

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!