Class: Vpago::AcledaMobile::TransactionStatus
- Defined in:
- lib/vpago/acleda_mobile/transaction_status.rb
Instance Attribute Summary collapse
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
-
#call(payment_token_id = nil) ⇒ Object
#TO DO: remove payment_token_id when check transaction status api ready.
- #prepare ⇒ Object
- #process(payment_token_id) ⇒ Object
- #success? ⇒ Boolean
Methods inherited from Base
#encryption_key, #initialize, #partner_id, #payment_number, #return_to_app_url
Methods included from PaymentAmountCalculator
#amount, #amount_with_fee, #transaction_fee, #transaction_fee_fix, #transaction_fee_percentage
Constructor Details
This class inherits a constructor from Vpago::AcledaMobile::Base
Instance Attribute Details
#error_message ⇒ Object
Returns the value of attribute error_message.
6 7 8 |
# File 'lib/vpago/acleda_mobile/transaction_status.rb', line 6 def end |
#result ⇒ Object
Returns the value of attribute result.
6 7 8 |
# File 'lib/vpago/acleda_mobile/transaction_status.rb', line 6 def result @result end |
Instance Method Details
#call(payment_token_id = nil) ⇒ Object
#TO DO: remove payment_token_id when check transaction status api ready
9 10 11 12 |
# File 'lib/vpago/acleda_mobile/transaction_status.rb', line 9 def call(payment_token_id = nil) prepare process(payment_token_id) end |
#prepare ⇒ Object
14 15 16 17 |
# File 'lib/vpago/acleda_mobile/transaction_status.rb', line 14 def prepare = nil @result = nil end |
#process(payment_token_id) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/vpago/acleda_mobile/transaction_status.rb', line 19 def process(payment_token_id) @result = { ErrorCode: '200', ErrorDescription: 'Success', TransactionId: payment_number, PaymentTokenId: payment_token_id, Amount: '', Currency: 'USD' } end |
#success? ⇒ Boolean
30 31 32 |
# File 'lib/vpago/acleda_mobile/transaction_status.rb', line 30 def success? .nil? end |