Gustav Kristoffer Ek > Business-Cashcow-0.08 > Business::Cashcow

Download:
Business-Cashcow-0.08.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.61   Source  

NAME ^

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

SYNOPSIS ^

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:

        Dankort 
        Visa/Dankort 
        Eurocard 
        MasterCard 
        Visa

This module is a perl wrapper for the c lib cashcow, se http://www.cashcow.dk/ for more info.

DESCRIPTION ^

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:

  'action_approved',
  'action_decline',
  'action_partly_approved',
  'action_amount_error',
  'action_invalid_transaction',
  'action_no_reply',
  'action_system_error',
  'action_expired_card',
  'action_retransmit',
  'action_internal_error'

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.

  Business::Cashcow::RequestCapture($ticket,"secret",7.25);

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

BUGS ^

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

AUTHOR ^

Gustav Kristoffer Ek <stoffer@netcetera.dk>

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.

syntax highlighting: