class Irankish::Verify
Attributes
merchantId[RW]
referenceNumber[RW]
response[R]
sha1Key[RW]
token[RW]
Public Class Methods
new(args = {})
click to toggle source
# File lib/irankish/verify.rb, line 15 def initialize(args = {}) @getTokenWSDL = Savon.client(wsdl: args.fetch(:verfiyWSDL, Irankish.configuration.verifyWSDL),namespaces: { "xmlns:tem" => "http://tempuri.org/", "xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/" }, namespace_identifier: :tem, env_namespace: :soapenv, log: true, # set true to switch on logging log_level: :debug, element_form_default: :qualified, pretty_print_xml: true, open_timeout: 3000000, read_timeout: 3000000, encoding: "UTF-8" ) @sha1Key = args.fetch(:sha1Key, Irankish.configuration.sha1Key) @merchantId = args.fetch(:merchantId, Irankish.configuration.merchantId) @amount = args.fetch(:amount) @referenceNumber = args.fetch(:referenceNumber) @token = args.fetch(:token) @response = ValidateVerify.new() end
Public Instance Methods
call()
click to toggle source
# File lib/irankish/verify.rb, line 39 def call response = @getTokenWSDL.call :kiccc_payments_verification, message: { 'token' => @token, 'merchantId' => @merchantId, 'referenceNumber' => @referenceNumber, 'sha1Key' => @sha1Key } @response.validate(response.body) end