Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

balanced.js is broken #91

Closed
vinkobuble opened this issue Apr 7, 2014 · 6 comments
Closed

balanced.js is broken #91

vinkobuble opened this issue Apr 7, 2014 · 6 comments
Labels

Comments

@vinkobuble
Copy link

Line 525: unknown object 'global'. I had to add line:

var global = {};

above to fix it.

@mjallday
Copy link
Contributor

mjallday commented Apr 7, 2014

How were you using it? This file is in production for many marketplaces so I suspect this may have been misconfiguration on your end. Can you provide a reproducible example?

@mjallday mjallday added the bug label Apr 7, 2014
@vinkobuble
Copy link
Author

I 've just copied balanced.js from github to my project, and it did not work. Where should 'global' be defined at?

@mjallday
Copy link
Contributor

mjallday commented Apr 7, 2014

Global is defined by the browser. If you're copying it into your project it sounds like you're doing server side work. balanced.js is only for client side work and should never be hosted by you, only Balanced.

Check out balanced-node if you're trying to do something on the server.

I'm closing this issue since I suspect this is just balanced.js being misused. Reopen if I'm wrong :)

@mjallday mjallday closed this as completed Apr 7, 2014
@vinkobuble
Copy link
Author

'Included in my project' means I downloaded it from balanced-js github repo, placed on server side to be served to web browser clients. Specifically I develop using Chrome browser. I still cannot use balanced.js in Chrome the way it is.

@mjallday
Copy link
Contributor

mjallday commented Apr 7, 2014

@vinkobuble you're still not giving me enough to reproduce and fix this error.

I'm using Chrome 33 and if I go to http://jsfiddle.net/an5Cz/35/ it works as I'd expect it to. Does that page work for you? All this example is doing is including https://js.balancedpayments.com/1.1/balanced.js and then calling the tokenize method on it.

Let me know if that works for you. If it doesn't then we can trouble shoot that, if it does then we need to find the difference between that example and your code. You can help by posting a gist of the rendered code so we can see what it looks like. How are you including balanced.js in your page. As I mentioned before I recommend you serve it from us, rather than serving it from your own source.

@vinkobuble
Copy link
Author

Once I switched to this balanced.js it works. Thanks for help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants