Class: SolidusSixSaferpay::PaymentPageGateway

Inherits:
Gateway
  • Object
show all
Defined in:
lib/solidus_six_saferpay/payment_page_gateway.rb

Instance Method Summary collapse

Methods inherited from Gateway

#capture, #credit, #initialize, #initialize_payment, #purchase, #refund, #try_void, #void

Constructor Details

This class inherits a constructor from SolidusSixSaferpay::Gateway

Instance Method Details

#assert(saferpay_payment, options = {}) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/solidus_six_saferpay/payment_page_gateway.rb', line 23

def assert(saferpay_payment, options = {})
  assert_response = perform_assert_request(saferpay_payment, options)

  response(
    true,
    "Saferpay Payment Page assert response: #{assert_response.to_h}",
    assert_response
  )
rescue SixSaferpay::Error => e
  handle_error(e, assert_response)
end

#authorize(_amount, saferpay_payment, options = {}) ⇒ Object

NOTE: Since PaymentPage payments are automatically authorized, the passed amount has no effect because the payment is automatically authorized for the full amount



19
20
21
# File 'lib/solidus_six_saferpay/payment_page_gateway.rb', line 19

def authorize(_amount, saferpay_payment, options = {})
  assert(saferpay_payment, options)
end

#inquire(saferpay_payment, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/solidus_six_saferpay/payment_page_gateway.rb', line 4

def inquire(saferpay_payment, options = {})
  inquire_response = perform_assert_request(saferpay_payment, options)

  response(
    true,
    "Saferpay Payment Page inquire (assert) response: #{inquire_response.to_h}",
    inquire_response
  )
rescue SixSaferpay::Error => e
  handle_error(e, inquire_response)
end