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'
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#url ⇒ Object
readonly
URL.
Class Method Summary collapse
-
.supported_cardtypes ⇒ Object
We support visa and master card.
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
Methods included from RequiresParameters
Methods included from PostsData
Constructor Details
#initialize(options = {}) ⇒ PsigateGateway
Returns a new instance of PsigateGateway.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 49 def initialize( = {}) requires!(, :login, :password) [:store_id] ||= [:login] # these are the defaults for the psigate test server @options = { :store_id => "teststore", :password => "testpass", }.update() super end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
44 45 46 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 44 def @options end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
43 44 45 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 43 def response @response end |
#url ⇒ Object (readonly)
URL
42 43 44 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 42 def url @url end |
Class Method Details
.supported_cardtypes ⇒ Object
We support visa and master card
90 91 92 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 90 def self.supported_cardtypes [:visa, :master] end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
Psigate PreAuth
63 64 65 66 67 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 63 def (money, creditcard, = {}) requires!(, :order_id) .update({ :CardAction => "1" }) commit(money, creditcard, ) end |
#capture(money, authorization, options = {}) ⇒ Object
Psigate PostAuth
77 78 79 80 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 77 def capture(money, , = {}) .update({ :CardAction => "2", :order_id => }) commit(money, nil, ) end |
#credit(money, authorization, options = {}) ⇒ Object
Psigate Credit
84 85 86 87 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 84 def credit(money, , = {}) .update({ :CardAction => "3", :order_id => }) commit(money, nil, ) end |
#purchase(money, creditcard, options = {}) ⇒ Object
Psigate Sale
70 71 72 73 74 |
# File 'lib/active_merchant/billing/gateways/psigate.rb', line 70 def purchase(money, creditcard, = {}) requires!(, :order_id) .update({ :CardAction => "0" }) commit(money, creditcard, ) end |