Class: Gestpay::Result::Payment

Inherits:
Base
  • Object
show all
Defined in:
lib/gestpay/result/payment.rb

Instance Attribute Summary

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods inherited from Base

#error, #initialize, #method_missing, #success?

Constructor Details

This class inherits a constructor from Gestpay::Result::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Gestpay::Result::Base

Instance Method Details

#amountObject



4
5
6
# File 'lib/gestpay/result/payment.rb', line 4

def amount
  BigDecimal(data[:amount])
end

#verify_by_visa?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/gestpay/result/payment.rb', line 8

def verify_by_visa?
  error_code == '8006'
end

#visa_encrypted_stringObject



12
13
14
15
# File 'lib/gestpay/result/payment.rb', line 12

def visa_encrypted_string
  verify_by_visa_data = data[:vb_v]
  verify_by_visa_data[:vb_v_risp] if verify_by_visa? && verify_by_visa_data[:vb_v_buyer] == 'OK'
end