Class: Vpago::TrueMoney::TransactionStatus
- Inherits:
-
Base
- Object
- Base
- Vpago::TrueMoney::TransactionStatus
show all
- Defined in:
- lib/vpago/true_money/transaction_status.rb
Constant Summary
Constants inherited
from Base
Base::CONTENT_TYPE_JSON, Base::DEFAULT_ALGORITHM, Base::DEFAULT_KEY_VERSION, Base::TOKEN_HEADERS
Instance Method Summary
collapse
Methods inherited from Base
#access_token, #access_token_url, #algorithm, #amount, #android_package_name, #check_transaction_url, #client_id, #client_secret, #currency, #default_headers, #external_ref_id, #fetch_access_token, #generate_payment_url, #initialize, #jwt_payload, #key_version, #order, #order_jwt_token, #parse_json, #payload, #payment_method, #private_key, #query_string, #redirect_type, #refund_url, #return_deeplink, #return_url_scheme, #service_type, #signature, #timestamp, #user_type
Instance Method Details
#call ⇒ Object
4
5
6
|
# File 'lib/vpago/true_money/transaction_status.rb', line 4
def call
@response = Faraday.get(check_transaction_url, nil, )
end
|
#json_response ⇒ Object
20
21
22
|
# File 'lib/vpago/true_money/transaction_status.rb', line 20
def json_response
@json_response ||= parse_json(@response.body)
end
|
#response_code ⇒ Object
12
13
14
|
# File 'lib/vpago/true_money/transaction_status.rb', line 12
def response_code
json_response.dig('status', 'code')
end
|
16
17
18
|
# File 'lib/vpago/true_money/transaction_status.rb', line 16
def signature_input
timestamp.to_s
end
|
#success? ⇒ Boolean
8
9
10
|
# File 'lib/vpago/true_money/transaction_status.rb', line 8
def success?
response_code == '000001'
end
|