Class: ActiveMerchant::Billing::WirecardGateway
- Defined in:
- lib/active_merchant/billing/gateways/wirecard.rb
Constant Summary collapse
- TEST_URL =
Test server location
'https://c3-test.wirecard.com/secure/ssl-gateway'
- LIVE_URL =
Live server location
'https://c3.wirecard.com/secure/ssl-gateway'
- ENVELOPE_NAMESPACES =
The Namespaces are not really needed, because it just tells the System, that there’s actually no namespace used. It’s just specified here for completeness.
{ 'xmlns:xsi' => 'http://www.w3.org/1999/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation' => 'wirecard.xsd' }
- PERMITTED_TRANSACTIONS =
%w[ AUTHORIZATION CAPTURE_AUTHORIZATION PURCHASE ]
- RETURN_CODES =
%w[ ACK NOK ]
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
Authorization.
-
#capture(money, authorization, options = {}) ⇒ Object
Capture Authorization.
-
#initialize(options = {}) ⇒ WirecardGateway
constructor
A new instance of WirecardGateway.
-
#purchase(money, creditcard, options = {}) ⇒ Object
Purchase.
-
#test? ⇒ Boolean
Should run against the test servers or not?.
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?
Methods included from Utils
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
included, #retry_exceptions, #ssl_post
Constructor Details
#initialize(options = {}) ⇒ WirecardGateway
Returns a new instance of WirecardGateway.
47 48 49 50 51 52 53 54 |
# File 'lib/active_merchant/billing/gateways/wirecard.rb', line 47 def initialize( = {}) # verify that username and password are supplied requires!(, :login, :password) # unfortunately Wirecard also requires a BusinessCaseSignature in the XML request requires!(, :signature) @options = super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
Authorization
62 63 64 65 66 67 |
# File 'lib/active_merchant/billing/gateways/wirecard.rb', line 62 def (money, creditcard, = {}) () @options[:credit_card] = creditcard request = build_request(:authorization, money, @options) commit(request) end |
#capture(money, authorization, options = {}) ⇒ Object
Capture Authorization
71 72 73 74 75 76 |
# File 'lib/active_merchant/billing/gateways/wirecard.rb', line 71 def capture(money, , = {}) () @options[:authorization] = request = build_request(:capture_authorization, money, @options) commit(request) end |
#purchase(money, creditcard, options = {}) ⇒ Object
Purchase
80 81 82 83 84 85 |
# File 'lib/active_merchant/billing/gateways/wirecard.rb', line 80 def purchase(money, creditcard, = {}) () @options[:credit_card] = creditcard request = build_request(:purchase, money, @options) commit(request) end |
#test? ⇒ Boolean
Should run against the test servers or not?
57 58 59 |
# File 'lib/active_merchant/billing/gateways/wirecard.rb', line 57 def test? @options[:test] || super end |