Class: ActiveMerchant::Billing::ClickandBuyGateway

Inherits:
Gateway
  • Object
show all
Defined in:
lib/active_merchant/billing/clickand_buy_gateway.rb

Instance Method Summary collapse

Constructor Details

#initialize(auth) ⇒ ClickandBuyGateway

Returns a new instance of ClickandBuyGateway.



13
14
15
16
# File 'lib/active_merchant/billing/clickand_buy_gateway.rb', line 13

def initialize(auth)
  requires!(auth, :project_id, :merchant_id, :secret_key)
  @auth = auth
end

Instance Method Details

#check_status(transaction_id) ⇒ Object



23
24
25
# File 'lib/active_merchant/billing/clickand_buy_gateway.rb', line 23

def check_status(transaction_id)
  perform(ClickandBuy::Request::StatusRequest.new(@auth, transaction_id))
end

#setup_purchase(amount, options) ⇒ Object



18
19
20
21
# File 'lib/active_merchant/billing/clickand_buy_gateway.rb', line 18

def setup_purchase(amount, options)
  requires!(options, :success_url, :failure_url, :order_id, :ip, :order_description, :locale)
  perform(ClickandBuy::Request::PayRequest.new(@auth, amount, options))
end