class Tinkoff::Payment
Attributes
amount[R]
details[R]
error_code[R]
message[R]
new_amount[R]
Attributes for Cancel method
order_id[R]
original_amount[R]
Attributes for Cancel method
payment_id[R]
payment_url[R]
status[R]
success[R]
terminal_key[R]
Public Class Methods
new(response)
click to toggle source
# File lib/tinkoff/payment.rb, line 9 def initialize(response) @terminal_key = response['TerminalKey'] @amount = response['Amount'] @order_id = response['OrderId'] @success = response['Success'] @status = response['Status'] @payment_id = response['PaymentId'] @error_code = response['ErrorCode'] @payment_url = response['PaymentURL'] @message = response['Message'] @details = response['Details'] # Attributes for Cancel method @original_amount = response['OriginalAmount'] @new_amount = response['NewAmount'] end
Public Instance Methods
failure?()
click to toggle source
# File lib/tinkoff/payment.rb, line 26 def failure? !@success end
success?()
click to toggle source
# File lib/tinkoff/payment.rb, line 30 def success? !failure? end