Class: Ipizza::PaymentResponse
Constant Summary
Constants inherited
from Response
Response::PARAM_ORDER
Instance Attribute Summary
Attributes inherited from Response
#verify_params, #verify_params_order
Instance Method Summary
collapse
Methods inherited from Response
#initialize, #verify
Instance Method Details
#automatic_message? ⇒ Boolean
11
12
13
|
# File 'lib/ipizza/payment_response.rb', line 11
def automatic_message?
@params['VK_AUTO'] == 'Y'
end
|
#payment_info ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/ipizza/payment_response.rb', line 15
def payment_info
@payment_info ||= Ipizza::Payment.new(
provider: @params['VK_SND_ID'],
stamp: @params['VK_STAMP'],
amount: @params['VK_AMOUNT'],
currency: @params['VK_CURR'],
refnum: @params['VK_REF'],
message: @params['VK_MSG'],
transaction_id: @params['VK_T_NO'],
receiver_account: @params['VK_REC_ACC'],
receiver_name: @params['VK_REC_NAME'],
sender_account: @params['VK_SND_ACC'],
sender_name: @params['VK_SND_NAME'],
transaction_time: @params['VK_T_DATETIME']
)
end
|
#success? ⇒ Boolean
3
4
5
|
# File 'lib/ipizza/payment_response.rb', line 3
def success?
%w(1111).include?(@params['VK_SERVICE'])
end
|
#valid? ⇒ Boolean
7
8
9
|
# File 'lib/ipizza/payment_response.rb', line 7
def valid?
@valid
end
|