Class ActiveMerchant::Billing::DataCashGateway
In: lib/active_merchant/billing/gateways/data_cash.rb
Parent: Gateway

Methods

authorize   capture   credit   new   purchase   test?   void  

Constants

TEST_URL = 'https://testserver.datacash.com/Transaction'   Datacash server URLs
LIVE_URL = 'https://mars.transaction.datacash.com/Transaction'
AUTH_TYPE = 'auth'   Different Card Transaction Types
CANCEL_TYPE = 'cancel'
FULFILL_TYPE = 'fulfill'
PRE_TYPE = 'pre'
REFUND_TYPE = 'refund'
TRANSACTION_REFUND_TYPE = 'txn_refund'
POLICY_ACCEPT = 'accept'   Constant strings for use in the ExtendedPolicy complex element for CV2 checks
POLICY_REJECT = 'reject'
DATACASH_SUCCESS = '1'   Datacash success code

Public Class methods

Creates a new DataCashGateway

The gateway requires that a valid login and password be passed in the options hash.

Options

  • :login — The Datacash account login.
  • :password — The Datacash account password.
  • :test => true or false — Use the test or live Datacash url.

Public Instance methods

Performs an authorization, which reserves the funds on the customer‘s credit card, but does not charge the card.

Parameters

  • money The amount to be authorized. Either an Integer value in cents or a Money object.
  • authorization_or_credit_card:: The continuous authority reference or CreditCard details for the transaction.
  • options A hash of optional parameters.
    • :order_id A unique reference for this order (corresponds to merchantreference in datacash documentation)
    • :set_up_continuous_authority::
       Set to true to set up a recurring historic transaction account be set up.
       Only supported for :visa, :master and :american_express card types
       See http://www.datacash.com/services/recurring/historic.php for more details of historic transactions.
      
    • :address:: billing address for card

The continuous authority reference will be available in response#params[‘ca_referece’] if you have requested one

Captures the funds from an authorized transaction.

Parameters

  • money — The amount to be captured. Either an Integer value in cents or a Money object.
  • authorization — The authorization returned from the previous authorize request.

Refund to a card

Parameters

  • money The amount to be refunded. Either an Integer value in cents or a Money object. Set to nil for a full refund on existing transaction.
  • reference_or_credit_card The credit card you want to refund OR the datacash_reference for the existing transaction you are refunding
  • options Are ignored when refunding via reference to an existing transaction, otherwise
    • :order_id A unique reference for this order (corresponds to merchantreference in datacash documentation)
    • :address:: billing address for card

Perform a purchase, which is essentially an authorization and capture in a single operation.

Parameters

  • money The amount to be authorized. Either an Integer value in cents or a Money object.
  • authorization_or_credit_card:: The continuous authority reference or CreditCard details for the transaction.
  • options A hash of optional parameters.
    • :order_id A unique reference for this order (corresponds to merchantreference in datacash documentation)
    • :set_up_continuous_authority
       Set to true to set up a recurring historic transaction account be set up.
       Only supported for :visa, :master and :american_express card types
       See http://www.datacash.com/services/recurring/historic.php for more details of historic transactions.
      
    • :address:: billing address for card

The continuous authority reference will be available in response#params[‘ca_referece’] if you have requested one

Is the gateway running in test mode?

Void a previous transaction

Parameters

  • authorization - The authorization returned from the previous authorize request.

[Validate]