itkin / lemonway

Lemonway whitelabel api
MIT License
2 stars 1 forks source link

Format IP incorrect (Lemonway::Client::Error) #2

Closed zenati closed 8 years ago

zenati commented 8 years ago

Hello, I keep getting an error when trying to run the following code:

require 'lemonway'
client = Lemonway::Client.new wl_login: "[EMAIL]",
                              wl_pass: "[EMAIL]",
                              language: "fr",
                              version: "1.1",
                              wsdl:  "https://ws.lemonway.fr/mb/demo/dev/directkit/service.asmx?wsdl"

resp = client.register_wallet  wallet: "123",
                                client_mail:        "nico@las.com",
                                client_first_name:  "nicolas",
                                client_last_name:   "nicolas"

This is the error I get :

/home/zenati/.rvm/gems/ruby-2.2.2/gems/lemonway-1.0.0/lib/lemonway/client.rb:45:in `client_call': 248 : Format IP incorrect (Lemonway::Client::Error)
    from /home/zenati/.rvm/gems/ruby-2.2.2/gems/lemonway-1.0.0/lib/lemonway/client.rb:29:in `method_missing'
    from app.rb:9:in `<main>'

Important : My IP Address is whitelisted.

Thanks.

itkin commented 8 years ago

you need to pass a :wallet_ip option which is supposed to be your user ip address (you can set yours or 127.0.0.1 as default when initializing your client instance, then override this option when necesary - when your register the wallet by instance ) , i'll add it to the readme, thanks for letting me know !