Class: ActiveMerchant::Billing::WebTehXmlGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::WebTehXmlGateway
- Defined in:
- lib/web_teh_xml.rb
Constant Summary collapse
- REQUEST_APPROVED =
Constants
"approved"
- RESPONSE_TYPE =
{ :secure_3d => "secure-message", :error => "errors" }
Instance Method Summary collapse
- #authorize(money, creditcard, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
- #complete_3ds(md, pares) ⇒ Object
-
#initialize(options = {}) ⇒ WebTehXmlGateway
constructor
TODO: process response code in response message from authentification/purchase.
- #purchase(money, creditcard, options = {}) ⇒ Object
- #refund(money, authorization, options = {}) ⇒ Object
- #void(money, authorization, options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ WebTehXmlGateway
TODO: process response code in response message from authentification/purchase
41 42 43 44 45 46 47 |
# File 'lib/web_teh_xml.rb', line 41 def initialize( = {}) requires!(, :login, :password, :key, :auth_token) @key = [ :key ] @auth_token = [ :auth_token ] super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
49 50 51 |
# File 'lib/web_teh_xml.rb', line 49 def (money, creditcard, = {}) return transfer_funds( money, creditcard, , "authorize" ) end |
#capture(money, authorization, options = {}) ⇒ Object
57 58 59 |
# File 'lib/web_teh_xml.rb', line 57 def capture(money, , = {}) return settle_transfer( money, , , "capture" ) end |
#complete_3ds(md, pares) ⇒ Object
69 70 71 72 73 |
# File 'lib/web_teh_xml.rb', line 69 def complete_3ds( md, pares ) xml = generate_3ds_complete_request( md, pares ) return commit( "pares", xml ) end |
#purchase(money, creditcard, options = {}) ⇒ Object
53 54 55 |
# File 'lib/web_teh_xml.rb', line 53 def purchase(money, creditcard, = {}) return transfer_funds( money, creditcard, , "purchase" ) end |
#refund(money, authorization, options = {}) ⇒ Object
61 62 63 |
# File 'lib/web_teh_xml.rb', line 61 def refund(money, , = {}) return settle_transfer( money, , , "refund" ) end |
#void(money, authorization, options = {}) ⇒ Object
65 66 67 |
# File 'lib/web_teh_xml.rb', line 65 def void(money, , = {}) return settle_transfer( money, , , "void" ) end |