Class: ActiveMerchant::Billing::FederatedCanadaGateway
- Defined in:
- lib/active_merchant/billing/gateways/federated_canada.rb
Constant Summary collapse
- URL =
Same URL for both test and live, testing is done by using the test username (demo) and password (password).
'https://secure.federatedgateway.com/api/transact.php'
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, 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 = {}) ⇒ FederatedCanadaGateway
constructor
A new instance of FederatedCanadaGateway.
- #purchase(money, creditcard, options = {}) ⇒ Object
- #refund(money, authorization, options = {}) ⇒ Object
- #void(authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?
Methods included from Utils
#deprecated, generate_unique_id
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ FederatedCanadaGateway
Returns a new instance of FederatedCanadaGateway.
23 24 25 26 27 |
# File 'lib/active_merchant/billing/gateways/federated_canada.rb', line 23 def initialize( = {}) requires!(, :login, :password) @options = super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/active_merchant/billing/gateways/federated_canada.rb', line 38 def (money, creditcard, = {}) post = {} add_invoice(post, ) add_creditcard(post, creditcard) add_address(post, ) add_customer_data(post, ) commit('auth', money, post) end |
#capture(money, authorization, options = {}) ⇒ Object
47 48 49 50 |
# File 'lib/active_merchant/billing/gateways/federated_canada.rb', line 47 def capture(money, , = {}) [:transactionid] = commit('capture', money, ) end |
#credit(money, authorization, options = {}) ⇒ Object
61 62 63 64 |
# File 'lib/active_merchant/billing/gateways/federated_canada.rb', line 61 def credit(money, , = {}) deprecated CREDIT_DEPRECATION_MESSAGE refund(money, , ) end |
#purchase(money, creditcard, options = {}) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/active_merchant/billing/gateways/federated_canada.rb', line 29 def purchase(money, creditcard, = {}) post = {} add_invoice(post, ) add_creditcard(post, creditcard) add_address(post, ) add_customer_data(post, ) commit('sale', money, post) end |
#refund(money, authorization, options = {}) ⇒ Object
57 58 59 |
# File 'lib/active_merchant/billing/gateways/federated_canada.rb', line 57 def refund(money, , = {}) commit('refund', money, .merge(:transactionid => )) end |
#void(authorization, options = {}) ⇒ Object
52 53 54 55 |
# File 'lib/active_merchant/billing/gateways/federated_canada.rb', line 52 def void(, = {}) [:transactionid] = commit('void', nil, ) end |