Hey there :) I''m about to integrate this Danish payment provider, DIBS, module into a website. To do so, I need to contact their server from our server, using our registered SSL certificate to encrypt the communication between us. Is this even possible? And if so, how? Thanks for any help! Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Daniel Smedegaard Buus
2007-Jun-13 13:00 UTC
Re: SSL encrypted server-to-server connection?
Daniel Smedegaard Buus wrote:> Hey there :) > > I''m about to integrate this Danish payment provider, DIBS, module into > a website. > > To do so, I need to contact their server from our server, using our > registered SSL certificate to encrypt the communication between us. > > Is this even possible? And if so, how? > > Thanks for any help! > > DanielOkay, that was pretty easy! Here''s an example of testing the auth.cgi thingie at DIBS (does not require Rails): require ''net/https'' site = Net::HTTP.new("payment.architrade.com", 443) site.use_ssl = true response = site.post2(''/cgi-ssl/auth.cgi'', "merchant=#{SystemSettings.dibs_account_info[:merchant_id]}&" + # Our merchant id as given by DIBS "textreply=true&" + # Telling auth.cgi that we don''t want any HTML description, just an easily parsed plain text response, please "amount=2000&" + # The amount to withdraw from the credit card in ører "currency=208&" + # The currency type, here DKK "cardno=5125861000000000&" + # Card number, duh! "cvc=684&" + # Check digits "expmon=06&" + # Expiration month as mm "expyear=24&" + # Expiration year as yy # "md5key=cfcd208495d565ef66e7dff9f98764da&" + # Our md5key (which we don''t have ATM) "orderid=TEST00102012&" + # The order id, which will be /W\d+/ "test=yes&" + # Is this just a test? "uniqueoid=yes" # Causes auth.cgi to reject orders with duplicate ids using reason=7 ) puts response.body # => status=ACCEPTED&transact=104125837&cardtype=MC(SE) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---