Class: DkPaymentGateway::TransactionStatus
- Inherits:
-
Object
- Object
- DkPaymentGateway::TransactionStatus
- Defined in:
- lib/dk_payment_gateway/transaction_status.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#check_current_day(params) ⇒ Hash
(also: #check_status)
Payment Status Verification - For current date Checks the status of a payment transaction for the current day.
-
#check_previous_days(params) ⇒ Hash
(also: #check_historical_status)
Payment Status Verification - Subsequent Business Days Checks the status of a payment transaction for previous business days.
-
#initialize(client) ⇒ TransactionStatus
constructor
A new instance of TransactionStatus.
Constructor Details
#initialize(client) ⇒ TransactionStatus
Returns a new instance of TransactionStatus.
7 8 9 |
# File 'lib/dk_payment_gateway/transaction_status.rb', line 7 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/dk_payment_gateway/transaction_status.rb', line 5 def client @client end |
Instance Method Details
#check_current_day(params) ⇒ Hash Also known as: check_status
Payment Status Verification - For current date Checks the status of a payment transaction for the current day
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/dk_payment_gateway/transaction_status.rb', line 20 def check_current_day(params) validate_current_day_params!(params) request_body = build_current_day_body(params) signature_headers = generate_signature_headers(request_body) response = client.post( '/v1/transaction/status', body: request_body, headers: signature_headers ) validate_response!(response, 'Transaction Status Check') response['response_data'] end |
#check_previous_days(params) ⇒ Hash Also known as: check_historical_status
Payment Status Verification - Subsequent Business Days Checks the status of a payment transaction for previous business days
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/dk_payment_gateway/transaction_status.rb', line 46 def check_previous_days(params) validate_previous_days_params!(params) request_body = build_previous_days_body(params) signature_headers = generate_signature_headers(request_body) response = client.post( '/v1/transactions/status', body: request_body, headers: signature_headers ) validate_response!(response, 'Transaction Status Check') response['response_data'] end |