Class: MerbMerchant::Billing::PsigateGateway
- Defined in:
- lib/merb_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
Constants included from PostsData
PostsData::MAX_RETRIES, PostsData::OPEN_TIMEOUT, PostsData::READ_TIMEOUT
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.
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 = {}) ⇒ PsigateGateway
Returns a new instance of PsigateGateway.
53 54 55 56 57 |
# File 'lib/merb_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/merb_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/merb_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/merb_merchant/billing/gateways/psigate.rb', line 81 def credit(money, , = {}) .update({ :CardAction => "3", :order_id => }) commit(money, nil, ) end |
#purchase(money, creditcard, options = {}) ⇒ Object
Psigate Sale
67 68 69 70 71 |
# File 'lib/merb_merchant/billing/gateways/psigate.rb', line 67 def purchase(money, creditcard, = {}) requires!(, :order_id) .update({ :CardAction => "0" }) commit(money, creditcard, ) end |