class Irankish::GetTransaction
Attributes
amount[RW]
merchantId[RW]
referenceNumber[RW]
response[R]
sha1Key[RW]
Public Class Methods
new(args = {})
click to toggle source
# File lib/irankish/get_transaction.rb, line 14 def initialize(args = {}) @getTokenWSDL = Savon.client(wsdl: args.fetch(:verfiyWSDL,Irankish.configuration.getTokenWSDL),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) @response = ValidateVerify.new() end
Public Instance Methods
call()
click to toggle source
# File lib/irankish/get_transaction.rb, line 37 def call response = @getTokenWSDL.call :get_limited_transacction, message: { 'merchantId' => @merchantId, 'invoiceNo' => @referenceNumber, 'amount' => @amount } @response.validate(response.body) end