Class: ActiveMerchant::Billing::PslCardGateway

Class | ActiveMerchant::Billing::PslCardGateway
In: | lib/active_merchant/billing/gateways/psl_card.rb
Parent: | Gateway

ActiveMerchant PSL Card Gateway

Notes:

      -To be able to use the capture function, the IP address of the machine must be
       registered with PSL
      -ESALE_KEYED should only be used in situations where the cardholder perceives the
       transaction to be Internet-based, such as purchasing from a web site/on-line store.
       If the Internet is used purely for the transport of information from the merchant
       directly to the gateway then the appropriate cardholder present or not present message
       type should be used rather than the ‘E’ equivalent.
      -The CV2 / AVS policies are set up with the account settings when signing up for an account

### Methods

authorize capture new purchase

### Constants

URL | = | 'https://pslcard3.paymentsolutionsltd.com/secure/transact.asp?' |  | PslCard server URL - The url is the same whether testing or live - use the test account when testing…
MESSAGE_TYPE | = | 'ESALE_KEYED' |  | eCommerce sale transaction, details keyed by merchant or cardholder
RESPONSE_ACTION | = | 'HTML' |  | The type of response that we want to get from PSL, options are HTML, XML or REDIRECT
CURRENCY_CODES | = | { 'AUD' => 036, 'GBP' => 826, 'USD' => 840 |  | Currency Codes
EMV_TERMINAL_TYPE | = | 32 |  | The terminal used - only for swipe transactions, so hard coded to 32 for online
DISPATCH_LATER | = | 'LATER' |  | Different Dispatch types
DISPATCH_NOW | = | 'NOW'
APPROVED | = | '00' |  | Return codes
NOMINAL_AMOUNT | = | 101 |  | Nominal amount to authorize for a ‘dispatch later’ type The nominal amount is held straight away, when the goods are ready to be dispatched, PSL is informed and the full amount is the taken.
AVS_CODE | = | { "ALL MATCH" => 'Y', "SECURITY CODE MATCH ONLY" => 'N', "ADDRESS MATCH ONLY" => 'Y', "NO DATA MATCHES" => 'N', "DATA NOT CHECKED" => 'R', "SECURITY CHECKS NOT SUPPORTED" => 'X'
CVV_CODE | = | { "ALL MATCH" => 'M', "SECURITY CODE MATCH ONLY" => 'M', "ADDRESS MATCH ONLY" => 'N', "NO DATA MATCHES" => 'N', "DATA NOT CHECKED" => 'P', "SECURITY CHECKS NOT SUPPORTED" => 'X'

### Public Class methods

new(options = {})

Create a new PslCardGateway

The gateway requires that a valid :login be passed in the options hash

Paramaters:

      -options:
        :login -    the PslCard account login (required)

### Public Instance methods

authorize(money, credit_card, options = {})

Authorize the transaction

Reserves the funds on the customer‘s credit card, but does not charge the card.

This implementation does not authorize the full amount, rather it checks that the full amount is available and only ‘reserves’ the nominal amount (currently a pound and a penny)

Parameters:

      -money: Money object for the total to be charged
      -authorization: the PSL cross reference from the previous authorization
      -options:

Returns:

      -ActiveRecord::Billing::Response object

capture(money, authorization, options = {})

Post an authorization.

Captures the funds from an authorized transaction.

Parameters:

      -money: Money object for the total to be charged
      -authorization: The PSL Cross Reference
      -options:

Returns:

      -ActiveRecord::Billing::Response object

purchase(money, credit_card, options = {})

Purchase the item straight away

Parameters:

      -money: Money object for the total to be charged
      -authorization: the PSL cross reference from the previous authorization
      -options:

Returns:

      -ActiveRecord::Billing::Response object

[Validate]