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.
Direct Known Subclasses
Constant Summary collapse
- CURRENCY_CODES =
{ "AED" => '784', "AFN" => '971', "ALL" => '008', "AMD" => '051', "ANG" => '532', "AOA" => '973', "ARS" => '032', "AUD" => '036', "AWG" => '533', "AZN" => '944', "BAM" => '977', "BBD" => '052', "BDT" => '050', "BGN" => '975', "BHD" => '048', "BIF" => '108', "BMD" => '060', "BND" => '096', "BOB" => '068', "BOV" => '984', "BRL" => '986', "BSD" => '044', "BTN" => '064', "BWP" => '072', "BYR" => '974', "BZD" => '084', "CAD" => '124', "CDF" => '976', "CHE" => '947', "CHF" => '756', "CHW" => '948', "CLF" => '990', "CLP" => '152', "CNY" => '156', "COP" => '170', "COU" => '970', "CRC" => '188', "CUP" => '192', "CVE" => '132', "CYP" => '196', "CZK" => '203', "DJF" => '262', "DKK" => '208', "DOP" => '214', "DZD" => '012', "EEK" => '233', "EGP" => '818', "ERN" => '232', "ETB" => '230', "EUR" => '978', "FJD" => '242', "FKP" => '238', "GBP" => '826', "GEL" => '981', "GHS" => '288', "GIP" => '292', "GMD" => '270', "GNF" => '324', "GTQ" => '320', "GYD" => '328', "HKD" => '344', "HNL" => '340', "HRK" => '191', "HTG" => '332', "HUF" => '348', "IDR" => '360', "ILS" => '376', "INR" => '356', "IQD" => '368', "IRR" => '364', "ISK" => '352', "JMD" => '388', "JOD" => '400', "JPY" => '392', "KES" => '404', "KGS" => '417', "KHR" => '116', "KMF" => '174', "KPW" => '408', "KRW" => '410', "KWD" => '414', "KYD" => '136', "KZT" => '398', "LAK" => '418', "LBP" => '422', "LKR" => '144', "LRD" => '430', "LSL" => '426', "LTL" => '440', "LVL" => '428', "LYD" => '434', "MAD" => '504', "MDL" => '498', "MGA" => '969', "MKD" => '807', "MMK" => '104', "MNT" => '496', "MOP" => '446', "MRO" => '478', "MTL" => '470', "MUR" => '480', "MVR" => '462', "MWK" => '454', "MXN" => '484', "MXV" => '979', "MYR" => '458', "MZN" => '943', "NAD" => '516', "NGN" => '566', "NIO" => '558', "NOK" => '578', "NPR" => '524', "NZD" => '554', "OMR" => '512', "PAB" => '590', "PEN" => '604', "PGK" => '598', "PHP" => '608', "PKR" => '586', "PLN" => '985', "PYG" => '600', "QAR" => '634', "ROL" => '642', "RON" => '946', "RSD" => '941', "RUB" => '643', "RWF" => '646', "SAR" => '682', "SBD" => '090', "SCR" => '690', "SDG" => '938', "SEK" => '752', "SGD" => '702', "SHP" => '654', "SKK" => '703', "SLL" => '694', "SOS" => '706', "SRD" => '968', "STD" => '678', "SYP" => '760', "SZL" => '748', "THB" => '764', "TJS" => '972', "TMM" => '795', "TND" => '788', "TOP" => '776', "TRY" => '949', "TTD" => '780', "TWD" => '901', "TZS" => '834', "UAH" => '980', "UGX" => '800', "USD" => '840', "USN" => '997', "USS" => '998', "UYU" => '858', "UZS" => '860', "VEB" => '862', "VND" => '704', "VUV" => '548', "WST" => '882', "XAF" => '950', "XAG" => '961', "XAU" => '959', "XBA" => '955', "XBB" => '956', "XBC" => '957', "XBD" => '958', "XCD" => '951', "XDR" => '960', "XOF" => '952', "XPD" => '964', "XPF" => '953', "XPT" => '962', "XTS" => '963', "XXX" => '999', "YER" => '886', "ZAR" => '710', "ZMK" => '894', "ZWD" => '716', }
- AVS_CODE =
{ "PASSED" => "Y", "FAILED" => "N", "PARTIAL" => "X", "NOT_CHECKED" => "X", "UNKNOWN" => "X" }
- CVV_CODE =
{ "PASSED" => "M", "FAILED" => "N", "PARTIAL" => "I", "NOT_CHECKED" => "P", "UNKNOWN" => "U" }
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, payment_source, 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
- #refund(money, authorization, options = {}) ⇒ Object
- #void(authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, #generate_unique_id, inherited, non_fractional_currency?, #scrub, supported_countries, #supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?, #test?
Methods included from CreditCardFormatting
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ IridiumGateway
Returns a new instance of IridiumGateway.
225 226 227 228 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 225 def initialize( = {}) requires!(, :login, :password) super end |
Instance Method Details
#authorize(money, payment_source, options = {}) ⇒ Object
230 231 232 233 234 235 236 237 238 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 230 def (money, payment_source, = {}) setup_address_hash() if payment_source.respond_to?(:number) commit(build_purchase_request('PREAUTH', money, payment_source, ), ) else commit(build_reference_request('PREAUTH', money, payment_source, ), ) end end |
#capture(money, authorization, options = {}) ⇒ Object
250 251 252 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 250 def capture(money, , = {}) commit(build_reference_request('COLLECTION', money, , ), ) end |
#credit(money, authorization, options = {}) ⇒ Object
254 255 256 257 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 254 def credit(money, , ={}) ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE refund(money, , ) end |
#purchase(money, payment_source, options = {}) ⇒ Object
240 241 242 243 244 245 246 247 248 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 240 def purchase(money, payment_source, = {}) setup_address_hash() if payment_source.respond_to?(:number) commit(build_purchase_request('SALE', money, payment_source, ), ) else commit(build_reference_request('SALE', money, payment_source, ), ) end end |
#refund(money, authorization, options = {}) ⇒ Object
259 260 261 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 259 def refund(money, , ={}) commit(build_reference_request('REFUND', money, , ), ) end |
#void(authorization, options = {}) ⇒ Object
263 264 265 |
# File 'lib/active_merchant/billing/gateways/iridium.rb', line 263 def void(, ={}) commit(build_reference_request('VOID', nil, , ), ) end |