Method: Privatbank::P24::Info#outgoing_xml

Defined in:
lib/privatbank/p24/info.rb

#outgoing_xmlObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/privatbank/p24/info.rb', line 26

def outgoing_xml
  builder = Builder::XmlMarkup.new
  builder.instruct!
  builder.request(version: '1.0') do |req|
    req.merchant do |merch|
      merch.id(@merchant_id)
      merch.signature(signature)
    end
    req.data do |d|
      d.oper('cmt')
      d.wait(0)
      d.test(0)
      d.payment(id: '') do |p|
        p.prop(name: 'cardnum',   value: @card_number)
        p.prop(name: 'country',   value: @country)
      end
    end
  end
  builder.target!
end