Class: Gateway::UsaEpay
- Inherits:
-
Gateway
- Object
- Gateway
- Gateway::UsaEpay
- 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.(payment)) creditcard.update_attributes(:gateway_customer_profile_id => profile_id, :gateway_payment_profile_id => 0) end end |
#payment_profiles_supported? ⇒ Boolean
12 13 14 |
# File 'app/models/spree/gateway/usa_epay.rb', line 12 def payment_profiles_supported? true end |
#provider_class ⇒ Object
8 9 10 |
# File 'app/models/spree/gateway/usa_epay.rb', line 8 def provider_class SpreeUsaEpay::Client end |