Class ActiveMerchant::Billing::ElavonGateway
In: lib/active_merchant/billing/gateways/elavon.rb
Parent: ViaklixGateway

Elavon Virtual Merchant Gateway

Example use:

  gateway = ActiveMerchant::Billing::ElavonGateway.new(
              :login     => "my_virtual_merchant_id",
              :password  => "my_virtual_merchant_pin",
              :user      => "my_virtual_merchant_user_id" # optional
           )

  # set up credit card obj as in main ActiveMerchant example
  creditcard = ActiveMerchant::Billing::CreditCard.new(
    :type       => 'visa',
    :number     => '41111111111111111',
    :month      => 10,
    :year       => 2011,
    :first_name => 'Bob',
    :last_name  => 'Bobsen'
  )

  # run request
  response = gateway.purchase(1000, creditcard) # authorize and capture 10 USD

  puts response.success?      # Check whether the transaction was successful
  puts response.message       # Retrieve the message returned by Elavon
  puts response.authorization # Retrieve the unique transaction ID returned by Elavon

Methods

authorize   capture  

Public Instance methods

Authorize a credit card for a given amount.

Parameters

  • money - The amount to be authorized as an Integer value in cents.
  • credit_card - The CreditCard details for the transaction.
  • options
    • :billing_address - The billing address for the cardholder.

Capture authorized funds from a credit card.

Parameters

  • money - The amount to be captured as an Integer value in cents.
  • authorization - The approval code returned from the initial authorization.
  • options
    • :credit_card - The CreditCard details from the initial transaction (required).

[Validate]