Sha256: b3c9def3c914730dceadc2b3e5902335dda4f39a286b212d182e177ec96e26e7

Contents?: true

Size: 634 Bytes

Versions: 2

Compression:

Stored size: 634 Bytes

Contents

module Mpesa
  class Status < Resource
    PATH = 'mpesa/transactionstatus/v1/query'
    def call
      Object.new post_request(url: PATH, body: body).body
    end

    def body
      {
        'CommandID': 'TransactionStatusQuery',
        'PartyA': params['shortcode'],
        'IdentifierType': 4,
        'Remarks': params['remarks'],
        'Initiator': params['initiator_username'],
        'SecurityCredential': '',
        'QueueTimeOutURL': params['timeout_url'],
        'ResultURL': params['result_url'],
        'TransactionID': params['transaction_id'],
        'Occassion': params['occasion']
      }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mpesarb-0.3.1 lib/mpesa/resources/balance.rb
mpesarb-0.3.0 lib/mpesa/resources/balance.rb