org.davesag.generica.core
Interface CreditCardAuthoriser

All Known Implementing Classes:
AbstractCreditCardAuthoriser

public interface CreditCardAuthoriser

All CreditCardAuthoriser implementations must be able to authorise a credit card payment and return a response code.

Since:
Generica 1.0
Version:
CVS Revision $Id: CreditCardAuthoriser.java,v 1.8 2004/03/30 13:00:41 davesag Exp $
Author:
Dave Sag http://www.davesag.com

Method Summary
 int authorisePayment(ShoppingOrder order, User user, CreditCard card, Merchant merchant)
          authorise payment of the given money from the given card, to the given merchant ID and return a response code.
 boolean responseIsAuthorised(int code)
          Different response codes mean different things, and this method lets you confirm that the response provided to any authorisation is actually 'authorised' and not some other response.
 

Method Detail

authorisePayment

public int authorisePayment(ShoppingOrder order,
                            User user,
                            CreditCard card,
                            Merchant merchant)
authorise payment of the given money from the given card, to the given merchant ID and return a response code.

Parameters:
order - The order being paid for.
user - The User making the payment.
card - The CreditCard to take payment from.
merchant - The Merchant requesting the authorisation.
Returns:
An authorisation code number.

responseIsAuthorised

public boolean responseIsAuthorised(int code)
Different response codes mean different things, and this method lets you confirm that the response provided to any authorisation is actually 'authorised' and not some other response.

Parameters:
code - The response code to check.
Returns:
true if the response code supplied meant the payment was authorised.


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.