Class: ActiveMerchant::Billing::IridiumGateway
- Defined in:
- lib/active_merchant/billing/gateways/iridium.rb
Overview
For more information on the Iridium Gateway please download the documentation from their Merchant Management System.
The login and password are not the username and password you use to login to the Iridium Merchant Management System. Instead, you will use the API username and password you were issued separately.
Constant Summary collapse
- TEST_URL =
'https://gw1.iridiumcorp.net/'
- LIVE_URL =
'https://gw1.iridiumcorp.net/'
- CURRENCY_CODES =
{ "AUD" => '036', "CAD" => '124', "EUR" => '978', "GBP" => '826', "MXN" => '484', "NZD" => '554', "USD" => '840', }
Constants inherited from Gateway
Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, creditcard, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
- #credit(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ IridiumGateway
constructor
A new instance of IridiumGateway.
- #purchase(money, payment_source, options = {}) ⇒ Object
- #void(authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
Methods included from Utils
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
Constructor Details
#initialize(options = {}) ⇒ IridiumGateway
Returns a new instance of IridiumGateway.
37 38 39 40 41 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 37 def initialize( = {}) requires!(, :login, :password) @options = super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
43 44 45 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 43 def (money, creditcard, = {}) commit(build_purchase_request('PREAUTH', money, creditcard, ), ) end |
#capture(money, authorization, options = {}) ⇒ Object
57 58 59 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 57 def capture(money, , = {}) commit(build_reference_request('COLLECTION', money, , ), ) end |
#credit(money, authorization, options = {}) ⇒ Object
61 62 63 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 61 def credit(money, , ={}) commit(build_reference_request('REFUND', money, , ), ) end |
#purchase(money, payment_source, options = {}) ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 47 def purchase(money, payment_source, = {}) setup_address_hash() if payment_source.is_a?(CreditCard) commit(build_purchase_request('SALE', money, payment_source, ), ) else commit(build_reference_request('SALE', money, payment_source, ), ) end end |
#void(authorization, options = {}) ⇒ Object
65 66 67 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 65 def void(, ={}) commit(build_reference_request('VOID', nil, , ), ) end |