Class: Gateway::UsaEpay

Inherits:
Gateway
  • Object
show all
Defined in:
app/models/spree/gateway/usa_epay.rb

Instance Method Summary collapse

Instance Method Details

#create_profile(payment) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'app/models/spree/gateway/usa_epay.rb', line 16

def create_profile(payment)
  amount = (payment.amount * 100).round
  creditcard = payment.source
  if creditcard.gateway_customer_profile_id.nil?
    profile_id = provider.add_customer(amount, creditcard, creditcard.gateway_options(payment))
    creditcard.update_attributes(:gateway_customer_profile_id => profile_id,
                                 :gateway_payment_profile_id => 0)
  end
end

#payment_profiles_supported?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/models/spree/gateway/usa_epay.rb', line 12

def payment_profiles_supported?
  true
end

#provider_classObject



8
9
10
# File 'app/models/spree/gateway/usa_epay.rb', line 8

def provider_class
  SpreeUsaEpay::Client
end