Module: Mobilepay::Client::PaymentStatus

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

Instance Method Summary collapse

Instance Method Details

#payment_status(args = {}) ⇒ Object

Merchants_GetPaymentStatus Gets the status of a given order



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

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