Module: Culqi::ConfirmType

Included in:
Order
Defined in:
lib/operation/confirm_type.rb

Instance Method Summary collapse

Instance Method Details

#confirm(params = {}, rsa_key = '', rsa_id = '') ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/operation/confirm_type.rb', line 10

def confirm(params={}, rsa_key='', rsa_id='')
  error = HelperValidation.validate_string_start(params[:order_id], "ord")
  if error
    return error
  end
  key = ''
  if(rsa_key != '')
    params = Encrypt.encrypt_with_aes_rsa(params, rsa_key, true)
  end
  key = Culqi.public_key
  response = Culqi.connect(@url+'confirm', key, params, 'post', Culqi::READ_TIMEOUT, false, rsa_id)
  return response
end

#initializeObject



6
7
8
# File 'lib/operation/confirm_type.rb', line 6

def initialize
  @url = ''
end