C# Class Kurejito.Gateways.DataCash.DataCashPaymentGateway

Implements the IPurchase interface to provide purchase and immediate payment capabilities when using DataCash as your payment provider.
Inheritance: IPurchase
Show file Open project: Kurejito/Kurejito Class Usage Examples

Public Methods

Method Description
Accepts ( Currency currency, CardType cardType ) : bool
DataCashPaymentGateway ( IHttpPostTransport http, string client, string password, string gatewayUri ) : System

Construct a new instance of the DataCashPaymentGateway.

Purchase ( string merchantReference, Kurejito.Payments.Money amount, PaymentCard card ) : PaymentResponse

Attempts to debit the specified amount from the supplied payment card.

Private Methods

Method Description
ExtractPaymentId ( System.Xml.Linq.XDocument xmlResponse ) : string
ExtractStatus ( XNode xml ) : PaymentStatus
MakeAuthenticationElement ( ) : System.Xml.Linq.XElement
MakeCardTxnElement ( PaymentCard card, Method method ) : System.Xml.Linq.XElement
MakeTransactionElement ( string merchantreference, decimal amount, string currency, PaymentCard card, Method method ) : System.Xml.Linq.XElement
MakeTxnDetailsElement ( string merchantreference, decimal amount, string currency ) : System.Xml.Linq.XElement
PopulateResponse ( System.Xml.Linq.XDocument xmlResponse ) : PaymentResponse

Method Details

Accepts() public method

public Accepts ( Currency currency, CardType cardType ) : bool
currency System.Currency
cardType CardType
return bool

DataCashPaymentGateway() public method

Construct a new instance of the DataCashPaymentGateway.
public DataCashPaymentGateway ( IHttpPostTransport http, string client, string password, string gatewayUri ) : System
http IHttpPostTransport The Http transport provider for communication with DataCash.
client string The client code for your payment gateway, as supplied by DataCash.
password string The password for your payment gateway, as supplised by DataCash.
gatewayUri string The endpoint URI of the DataCash payment system.
return System

Purchase() public method

Attempts to debit the specified amount from the supplied payment card.
public Purchase ( string merchantReference, Kurejito.Payments.Money amount, PaymentCard card ) : PaymentResponse
merchantReference string An alphanumeric reference supplied by the merchant that uniquely identifies this transaction
amount Kurejito.Payments.Money The amount of money to be debited from the payment card (includes the ISO4217 currency code).
card Kurejito.Payments.PaymentCard An instance of containing the customer's payment card details.
return PaymentResponse