Class: WirecardCheckoutPage::Gateway
- Inherits:
-
Object
- Object
- WirecardCheckoutPage::Gateway
- Defined in:
- lib/wirecard_checkout_page/gateway.rb
Instance Attribute Summary collapse
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#shop_id ⇒ Object
Returns the value of attribute shop_id.
-
#toolkit_password ⇒ Object
Returns the value of attribute toolkit_password.
Instance Method Summary collapse
- #check_response(params = {}) ⇒ Object
- #init(params = {}) ⇒ Object
-
#initialize(customer_id: nil, secret: nil, toolkit_password: nil, shop_id: nil) ⇒ Gateway
constructor
A new instance of Gateway.
- #recurring_init(params = {}) ⇒ Object
- #recurring_process(params = {}) ⇒ Object
Constructor Details
#initialize(customer_id: nil, secret: nil, toolkit_password: nil, shop_id: nil) ⇒ Gateway
Returns a new instance of Gateway.
6 7 8 9 10 11 |
# File 'lib/wirecard_checkout_page/gateway.rb', line 6 def initialize(customer_id: nil, secret: nil, toolkit_password: nil, shop_id: nil) @customer_id = customer_id @secret = secret @toolkit_password = toolkit_password @shop_id = shop_id end |
Instance Attribute Details
#customer_id ⇒ Object
Returns the value of attribute customer_id.
4 5 6 |
# File 'lib/wirecard_checkout_page/gateway.rb', line 4 def customer_id @customer_id end |
#secret ⇒ Object
Returns the value of attribute secret.
4 5 6 |
# File 'lib/wirecard_checkout_page/gateway.rb', line 4 def secret @secret end |
#shop_id ⇒ Object
Returns the value of attribute shop_id.
4 5 6 |
# File 'lib/wirecard_checkout_page/gateway.rb', line 4 def shop_id @shop_id end |
#toolkit_password ⇒ Object
Returns the value of attribute toolkit_password.
4 5 6 |
# File 'lib/wirecard_checkout_page/gateway.rb', line 4 def toolkit_password @toolkit_password end |
Instance Method Details
#check_response(params = {}) ⇒ Object
28 29 30 |
# File 'lib/wirecard_checkout_page/gateway.rb', line 28 def check_response(params = {}) CheckedResponse.new params.merge(authentication_params) end |
#init(params = {}) ⇒ Object
13 14 15 16 |
# File 'lib/wirecard_checkout_page/gateway.rb', line 13 def init(params = {}) params = params.merge(authentication_params).merge( transactionIdentifier: 'SINGLE' ) InitRequest.new(params: params).call end |
#recurring_init(params = {}) ⇒ Object
18 19 20 21 |
# File 'lib/wirecard_checkout_page/gateway.rb', line 18 def recurring_init(params = {}) params = params.merge(authentication_params).merge( transactionIdentifier: 'INITIAL' ) InitRequest.new(params: params).call end |
#recurring_process(params = {}) ⇒ Object
23 24 25 26 |
# File 'lib/wirecard_checkout_page/gateway.rb', line 23 def recurring_process(params = {}) params = params.merge(toolkit_authentication_params) Toolkit::RecurPayment.new(params: params).call end |