Class: ActiveMerchant::Billing::PsigateGateway
- Defined in:
- lib/active_merchant/billing/gateways/psigate.rb
Constant Summary collapse
- TEST_URL =
'https://dev.psigate.com:7989/Messenger/XMLMessenger'
- LIVE_URL =
'https://secure.psigate.com:7934/Messenger/XMLMessenger'
- SUCCESS_MESSAGE =
'Success'
- FAILURE_MESSAGE =
'The transaction was declined'
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
Psigate PreAuth.
-
#capture(money, authorization, options = {}) ⇒ Object
Psigate PostAuth.
-
#credit(money, authorization, options = {}) ⇒ Object
Psigate Credit.
-
#initialize(options = {}) ⇒ PsigateGateway
constructor
A new instance of PsigateGateway.
-
#purchase(money, creditcard, options = {}) ⇒ Object
Psigate Sale.
- #refund(money, authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
Methods included from CreditCardFormatting
Constructor Details
#initialize(options = {}) ⇒ PsigateGateway
Returns a new instance of PsigateGateway.
53 54 55 56 57 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 53 def initialize( = {}) requires!(, :login, :password) @options = super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
Psigate PreAuth
60 61 62 63 64 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 60 def (money, creditcard, = {}) requires!(, :order_id) .update({ :CardAction => "1" }) commit(money, creditcard, ) end |
#capture(money, authorization, options = {}) ⇒ Object
Psigate PostAuth
74 75 76 77 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 74 def capture(money, , = {}) .update({ :CardAction => "2", :order_id => }) commit(money, nil, ) end |
#credit(money, authorization, options = {}) ⇒ Object
Psigate Credit
81 82 83 84 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 81 def credit(money, , = {}) deprecated CREDIT_DEPRECATION_MESSAGE refund(money, , ) end |
#purchase(money, creditcard, options = {}) ⇒ Object
Psigate Sale
67 68 69 70 71 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 67 def purchase(money, creditcard, = {}) requires!(, :order_id) .update({ :CardAction => "0" }) commit(money, creditcard, ) end |
#refund(money, authorization, options = {}) ⇒ Object
86 87 88 89 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 86 def refund(money, , = {}) .update({ :CardAction => "3", :order_id => }) commit(money, nil, ) end |