Class: ActiveMerchant::Billing::EpsilonBaseGateway

Inherits:
Gateway
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/epsilon/epsilon_base.rb

Overview

This is the base gateway for concrete payment gateway for Epsilon

Create a new EpsilonGatway

class EpsilonSampleGateway < EpsilonBaseGateway

def purchase(amount, payment_method, detail = {})
  request_params = {
    contract_code: self.contract_code,
    user_id:       detail[:user_id],
    item_code:     detail[:item_code],
    order_number:  detail[:order_number],
    item_price:    amount,
  }

  request_path = 'purchase'

  commit(request_path, request_paramsparams)
end

end

Constant Summary collapse

DEFAULT_RESPONSE_KEYS =
[
  :transaction_code,
  :error_code,
  :error_detail,
  :card_number_mask,
  :card_brand,
  :card_expire,
  :three_d_secure,
  :acs_url,
  :pa_req,
  :receipt_number,
  :receipt_date
].freeze