Class: Vpago::AcledaMobile::PaymentRequestUpdater
- Inherits:
-
PaymentRequestUpdater
- Object
- PaymentRequestUpdater
- Vpago::AcledaMobile::PaymentRequestUpdater
- Defined in:
- lib/vpago/acleda_mobile/payment_request_updater.rb
Instance Attribute Summary
Attributes inherited from PaymentRequestUpdater
Instance Method Summary collapse
Methods inherited from PaymentRequestUpdater
#ignore_on_failed?, #initialize, #success?
Constructor Details
This class inherits a constructor from Vpago::PaymentRequestUpdater
Instance Method Details
#call ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vpago/acleda_mobile/payment_request_updater.rb', line 4 def call checker = payment_status_checker if checker.success? = nil checker_result = { status: true, description: nil, acleda_response: checker.result } = .merge(checker_result) marker = ::Vpago::PaymentStatusMarker.new(@payment, ) marker.call elsif !ignore_on_failed? = checker. = .merge(status: false, description: ) marker = ::Vpago::PaymentStatusMarker.new(@payment, ) marker.call end end |
#payment_status_checker ⇒ Object
27 28 29 30 31 |
# File 'lib/vpago/acleda_mobile/payment_request_updater.rb', line 27 def payment_status_checker trans_status = Vpago::AcledaMobile::TransactionStatus.new(@payment) trans_status.call([:payment_token_id]) # #TO DO: remove payment_token_id when check transaction status api ready trans_status end |