Module: Mobilepay::Client::PaymentTransactions

Included in:
Mobilepay::Client
Defined in:
lib/mobilepay/client/payment_transactions.rb

Instance Method Summary collapse

Instance Method Details

#payment_transactions(args = {}) ⇒ Object

Merchants_GetPaymentTransactions Gets the transactions for a given order



7
8
9
10
11
12
13
# File 'lib/mobilepay/client/payment_transactions.rb', line 7

def payment_transactions(args = {})
    check_args(order_id: args[:order_id])
    response = call(:get, "/merchants/#{merchant_id}/orders/#{args[:order_id]}/transactions", { body: '' })
    JSON.parse(response.body)
rescue Failure => ex
    return { error: ex.message }
end