Class: Bygpay::Deposit::Mobile

Inherits:
Bygpay::Deposits show all
Defined in:
lib/bygpay/deposit/mobile.rb

Instance Attribute Summary

Attributes included from Utils

#amount, #meta_data, #response, #response_text, #result, #status, #transaction_id, #uuid

Instance Method Summary collapse

Methods inherited from Bygpay::Deposits

#transaction_status

Methods included from Utils

#card_deposit_endpoint, #deposit_status_endpoint, #expresspay_deposit_endpoint, #get_status, #http_connect, #hubtel_deposit_endpoint, #mobile_deposit_endpoint, #mobile_withdraw_endpoint, #parse_response, #paystack_deposit_endpoint, #post, #rave_deposit_endpoint, #withdraw_status_endpoint

Instance Method Details

#charge(amount, mobile_data = {}) ⇒ Object

Perform a mobile deposit request mobile data example

"walletno" : "0276967627",
"provider": "TIGO",
"currency": "USD", # Optional
"token": "393902", # Optional (Only Required for Vodafone Payments)
"extrnx_code": null # Optional

Parameters:

  • amount (Decimal)
  • mobile_data (Hash) (defaults to: {})


16
17
18
# File 'lib/bygpay/deposit/mobile.rb', line 16

def charge(amount, mobile_data = {})
  post(mobile_deposit_endpoint, mobile_data.merge(amount: amount))
end