class Irankish::ValidateVerify
Attributes
response[R]
status[R]
statusmessage[R]
Public Instance Methods
get_code()
click to toggle source
# File lib/irankish/validate_verify.rb, line 17 def get_code get_price() end
get_price()
click to toggle source
# File lib/irankish/validate_verify.rb, line 14 def get_price return @response[:kiccc_payments_verification_response][:kiccc_payments_verification_result] end
valid?()
click to toggle source
# File lib/irankish/validate_verify.rb, line 11 def valid? @valid end
validate(response = nil)
click to toggle source
# File lib/irankish/validate_verify.rb, line 5 def validate(response = nil) @response = response perform_validation return self end
Private Instance Methods
perform_validation()
click to toggle source
# File lib/irankish/validate_verify.rb, line 23 def perform_validation raise ArgumentError, 'not a valid response' if @response.nil? @valid = (!['-51', '-50', '-20','-30','-80','-81','-90','513','512','511','510','509','508','507','506','505','504','503','502','501','500','499','203','202','201','200','167','166','160','150','140','133','132','131','130','121','120','110','100'].include? @response[:kiccc_payments_verification_response][:kiccc_payments_verification_result].to_s) end