Business::Cashcow - Perl wrapper for Cascow, a lib for making Dankort payment.


A module for clearing Internet payment transactions with the Danish PBS through a SSL connection, provided by the excellent OpenSSL library. CashCow will clear the following kinds of transactions between a customer and PBS:


This module is a perl wrapper for the c lib cashcow, se for more info.


Business::Cashcow::InitCashcow("passphrase", "rc4key");

Call this function to load the /etc/cashcow.ini file and setup state regarding keys and certificates. Returns true if private key was successfully unlocked using the supplied passphase, false otherwise.

  my $transaction = {card_number => '76009244561',
                     card_expirymonth => 7,
                     card_expiryyear => 8,
                     transaction_reference => '99910326',
                     transaction_amount => 7.25,
                     transaction_currency => 208,
                     merchant_name => 'Enterprise Advertising A/S',
                     merchant_address => 'Aarhusgade 108E, 3.',
                     merchant_city => 'Koebenhavn',
                     merchant_zip => '2100 OE',
                     merchant_region => '',
                     merchant_country => 'DNK',
                     merchant_poscode => 0,    # POS_ECOMMERCE_SSL
                     merchant_number => '2133334',
                     merchant_terminalid => 'INET01',
                     result_action => 0,
                     result_approval => '',
                     result_ticket => '',
                     cashcow => ''

  Business::Cashcow::RequestAuth($transaction, $ticket, "secret");

This function make the initial communucation to verify the card etc. It returns on of the folowing status messages:


and sets $ticket to a ticket to be used as reference of the transaction in Cashcow::RequestCapture. It shoud be called as a response of an order.


This function compleetes the payment. It should be called when the merchant has fullfilled the order.


The software is an alpha, so don't blame me, but bug (and success) reports are also welcome.


Gustav Kristoffer Ek <>

Copyright 1999 Gustav Kristoffer Ek. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.