Class: Adyen::REST::AuthorisePayment::Response
- Defined in:
- lib/adyen/rest/authorise_payment.rb
Overview
The Response class implements some extensions for the authorise payment call.
Instance Attribute Summary
Attributes inherited from Response
#attributes, #http_response, #prefix
Instance Method Summary collapse
-
#authorised? ⇒ Boolean
(also: #authorized?)
Checks whether the authorisation was successful.
-
#redirect_shopper? ⇒ Boolean
Checks whether the result of the authorization call was RedirectShopper, which means that the customer has to be redirected away from your site to complete the 3Dsecure transaction.
-
#refused? ⇒ Boolean
Check whether the payment was refused.
-
#result_code ⇒ String
Returns the result code from the transaction.
Methods inherited from Response
#[], #has_attribute?, #initialize, #psp_reference
Constructor Details
This class inherits a constructor from Adyen::REST::Response
Instance Method Details
#authorised? ⇒ Boolean Also known as:
Checks whether the authorisation was successful.
46 47 48 |
# File 'lib/adyen/rest/authorise_payment.rb', line 46 def result_code == AUTHORISED end |
#redirect_shopper? ⇒ Boolean
Checks whether the result of the authorization call was RedirectShopper, which means that the customer has to be redirected away from your site to complete the 3Dsecure transaction.
63 64 65 |
# File 'lib/adyen/rest/authorise_payment.rb', line 63 def redirect_shopper? result_code == REDIRECT_SHOPPER end |
#refused? ⇒ Boolean
Check whether the payment was refused.
54 55 56 |
# File 'lib/adyen/rest/authorise_payment.rb', line 54 def refused? result_code == REFUSED end |
#result_code ⇒ String
Returns the result code from the transaction.
72 73 74 |
# File 'lib/adyen/rest/authorise_payment.rb', line 72 def result_code self[:result_code] end |