Class: SolidusSixSaferpay::GatewayResponse
- Inherits:
-
Object
- Object
- SolidusSixSaferpay::GatewayResponse
- Defined in:
- lib/solidus_six_saferpay/gateway_response.rb
Instance Attribute Summary collapse
-
#api_response ⇒ Object
readonly
Returns the value of attribute api_response.
-
#authorization ⇒ Object
readonly
Returns the value of attribute authorization.
-
#error_name ⇒ Object
readonly
Returns the value of attribute error_name.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#test ⇒ Object
readonly
Returns the value of attribute test.
Instance Method Summary collapse
-
#avs_result ⇒ Object
To ensure that solidus sets the response_code after successful capture, we need to pass it as an “authorization”, however if we do this then solidus also expects there to be an “avs_result”.
-
#cvv_result ⇒ Object
To ensure that solidus sets the response_code after successful capture, we need to pass it as an “authorization”, however if we do this then solidus also expects this response to respond to :cvv_result.
-
#initialize(success, message, api_response, options = {}) ⇒ GatewayResponse
constructor
A new instance of GatewayResponse.
- #success? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(success, message, api_response, options = {}) ⇒ GatewayResponse
Returns a new instance of GatewayResponse.
6 7 8 9 10 |
# File 'lib/solidus_six_saferpay/gateway_response.rb', line 6 def initialize(success, , api_response, = {}) @success, @message, @api_response = success, , api_response @error_name = [:error_name] @authorization = [:authorization] end |
Instance Attribute Details
#api_response ⇒ Object (readonly)
Returns the value of attribute api_response.
4 5 6 |
# File 'lib/solidus_six_saferpay/gateway_response.rb', line 4 def api_response @api_response end |
#authorization ⇒ Object (readonly)
Returns the value of attribute authorization.
4 5 6 |
# File 'lib/solidus_six_saferpay/gateway_response.rb', line 4 def @authorization end |
#error_name ⇒ Object (readonly)
Returns the value of attribute error_name.
4 5 6 |
# File 'lib/solidus_six_saferpay/gateway_response.rb', line 4 def error_name @error_name end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/solidus_six_saferpay/gateway_response.rb', line 4 def @message end |
#test ⇒ Object (readonly)
Returns the value of attribute test.
4 5 6 |
# File 'lib/solidus_six_saferpay/gateway_response.rb', line 4 def test @test end |
Instance Method Details
#avs_result ⇒ Object
To ensure that solidus sets the response_code after successful capture, we need to pass it as an “authorization”, however if we do this then solidus also expects there to be an “avs_result”
see github.com/solidusio/solidus/blob/master/core/app/models/spree/payment/processing.rb#L171
25 26 27 |
# File 'lib/solidus_six_saferpay/gateway_response.rb', line 25 def avs_result {} end |
#cvv_result ⇒ Object
To ensure that solidus sets the response_code after successful capture, we need to pass it as an “authorization”, however if we do this then solidus also expects this response to respond to :cvv_result
see github.com/solidusio/solidus/blob/master/core/app/models/spree/payment/processing.rb#L171
34 35 36 |
# File 'lib/solidus_six_saferpay/gateway_response.rb', line 34 def cvv_result nil end |
#success? ⇒ Boolean
12 13 14 |
# File 'lib/solidus_six_saferpay/gateway_response.rb', line 12 def success? @success end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/solidus_six_saferpay/gateway_response.rb', line 16 def to_s end |