Class: ActiveMerchant::Billing::SallieMaeGateway
- Defined in:
- lib/active_merchant/billing/gateways/sallie_mae.rb
Constant Summary
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, creditcard, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ SallieMaeGateway
constructor
A new instance of SallieMaeGateway.
- #purchase(money, creditcard, options = {}) ⇒ Object
- #test? ⇒ Boolean
Methods inherited from Gateway
#add_field_to_post_if_present, #add_fields_to_post_if_present, #card_brand, card_brand, #generate_unique_id, inherited, #scrub, #supported_countries, supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?
Methods included from CreditCardFormatting
#expdate, #format, #strftime_yyyymm
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ SallieMaeGateway
Returns a new instance of SallieMaeGateway.
18 19 20 21 |
# File 'lib/active_merchant/billing/gateways/sallie_mae.rb', line 18 def initialize( = {}) requires!(, :login) super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/active_merchant/billing/gateways/sallie_mae.rb', line 27 def (money, creditcard, = {}) post = PostData.new add_invoice(post, ) add_creditcard(post, creditcard) add_address(post, creditcard, ) add_customer_data(post, ) commit(:authonly, money, post) end |
#capture(money, authorization, options = {}) ⇒ Object
47 48 49 50 51 |
# File 'lib/active_merchant/billing/gateways/sallie_mae.rb', line 47 def capture(money, , = {}) post = PostData.new post[:postonly] = commit(:capture, money, post) end |
#purchase(money, creditcard, options = {}) ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'lib/active_merchant/billing/gateways/sallie_mae.rb', line 37 def purchase(money, creditcard, = {}) post = PostData.new add_invoice(post, ) add_creditcard(post, creditcard) add_address(post, creditcard, ) add_customer_data(post, ) commit(:sale, money, post) end |
#test? ⇒ Boolean
23 24 25 |
# File 'lib/active_merchant/billing/gateways/sallie_mae.rb', line 23 def test? @options[:login] == 'TEST0' end |