Mangopay / mangopay2-ruby-sdk

Ruby Gem for MANGOPAY
https://rubygems.org/gems/mangopay
MIT License
42 stars 38 forks source link

hostname "api-preprod.mangopay.com" does not match the server certificate #3

Closed kpgdev closed 10 years ago

kpgdev commented 10 years ago

hi

i am just trying to install mangopay. i've just set up a new account using

http://docs.mangopay.com/api-references/sandbox-credentials/

and installing this gem then running the generator (XX is in place of my credientials)

rails generate mangopay:install XX XX XX

but i am getting a cert error:

hostname "api-preprod.mangopay.com" does not match the server certificate

any ideas?

thanks

farmdrop

FlorianGuerrier commented 10 years ago

Hi,

Thanks a lot for your question. This SDK is actually not fully up to date. A new version is currently in development. We will get back to you very soon.

We changed the root URL, that's why you're getting such an issue. You can force it using this code (replacing the URL by this one):

MangoPay.configure do |c|
    c.client_id = ...
    c.client_passphrase = ...
    c.root_url = 'https://api.sandbox.mangopay.com'
end

The other changes will be additional objects or requests.

Best Florian

kpgdev commented 10 years ago

great thanks - i've added these to a .env file.

MangoPay.configure do |c| c.client_id = ENV["MANGOPAY_CLIENTID"] c.client_passphrase = ENV["MANGOPAY_PASSPHRASE"] c.root_url = 'https://api.sandbox.mangopay.com' end