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

Methods

authorize   capture   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'
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.
  • credit_card — The CreditCard details for the transaction.
  • options — A hash of optional parameters.

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.

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

Parameters

  • money — The amount to be purchased. Either an Integer value in cents or a Money object.
  • credit_card — The CreditCard details for the transaction.
  • options — A hash of optional parameters.

Is the gateway running in test mode?

Void a previous transaction

Parameters

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

[Validate]