Class: MPower::Checkout::Core
- Inherits:
-
Object
- Object
- MPower::Checkout::Core
- Includes:
- Utilities
- Defined in:
- lib/mpower/checkout.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#invoice_token ⇒ Object
Returns the value of attribute invoice_token.
-
#response_code ⇒ Object
Returns the value of attribute response_code.
-
#response_text ⇒ Object
Returns the value of attribute response_text.
-
#result ⇒ Object
Returns the value of attribute result.
-
#status ⇒ Object
Returns the value of attribute status.
-
#token ⇒ Object
Returns the value of attribute token.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Instance Method Summary collapse
Methods included from Utilities
#hash_to_json, #http_get_request, #http_json_request, #json_to_hash
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/mpower/checkout.rb', line 5 def description @description end |
#invoice_token ⇒ Object
Returns the value of attribute invoice_token.
5 6 7 |
# File 'lib/mpower/checkout.rb', line 5 def invoice_token @invoice_token end |
#response_code ⇒ Object
Returns the value of attribute response_code.
5 6 7 |
# File 'lib/mpower/checkout.rb', line 5 def response_code @response_code end |
#response_text ⇒ Object
Returns the value of attribute response_text.
5 6 7 |
# File 'lib/mpower/checkout.rb', line 5 def response_text @response_text end |
#result ⇒ Object
Returns the value of attribute result.
5 6 7 |
# File 'lib/mpower/checkout.rb', line 5 def result @result end |
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/mpower/checkout.rb', line 5 def status @status end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/mpower/checkout.rb', line 5 def token @token end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
5 6 7 |
# File 'lib/mpower/checkout.rb', line 5 def transaction_id @transaction_id end |
Instance Method Details
#push_results(result = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/mpower/checkout.rb', line 7 def push_results(result={}) @result = result @transaction_id = result["transaction_id"] @description = result["description"] @response_code = result["response_code"] @response_text = result["response_text"] @token = result["token"] @response_code == "00" ? @status = MPower::SUCCESS : @status = MPower::FAIL end |