SSL encrypted server-to-server connection?

Hey there :slight_smile:

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 Smedegaard B. wrote:

Thanks for any help!


Okay, that was pretty easy!

Here’s an example of testing the auth.cgi thingie at DIBS (does not
require Rails):

require ‘net/https’
site =“”, 443)
site.use_ssl = true
response = site.post2(‘/cgi-ssl/auth.cgi’,
“merchant=#{SystemSettings.dibs_account_info[:merchant_id]}&” + #
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

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
puts response.body # =>