Class: Adyen::API::PaymentService::ModificationResponse
- Defined in:
- lib/adyen/api/payment_service.rb
Direct Known Subclasses
CancelOrRefundResponse, CancelResponse, CaptureResponse, RefundResponse
Class Attribute Summary collapse
Attributes inherited from Response
Instance Method Summary collapse
- #params ⇒ Object
-
#success? ⇒ Boolean
This only returns whether or not the request has been successfully received.
Methods inherited from Response
#body, #fault_message, #http_failure?, #initialize, response_attrs, #server_error?, #xml_querier
Constructor Details
This class inherits a constructor from Adyen::API::Response
Class Attribute Details
.base_xpath ⇒ Object
332 333 334 |
# File 'lib/adyen/api/payment_service.rb', line 332 def base_xpath @base_xpath end |
.request_received_value ⇒ Object
332 333 334 |
# File 'lib/adyen/api/payment_service.rb', line 332 def request_received_value @request_received_value end |
Instance Method Details
#params ⇒ Object
343 344 345 346 347 348 349 350 |
# File 'lib/adyen/api/payment_service.rb', line 343 def params @params ||= xml_querier.xpath(self.class.base_xpath) do |result| { :psp_reference => result.text('./payment:pspReference'), :response => result.text('./payment:response') } end end |
#success? ⇒ Boolean
This only returns whether or not the request has been successfully received. Check the subsequent notification to see if the payment was actually mutated.
339 340 341 |
# File 'lib/adyen/api/payment_service.rb', line 339 def success? super && params[:response] == self.class.request_received_value end |