Class: Bygpay::Deposit::Card
- Inherits:
-
Bygpay::Deposits
- Object
- Bygpay::Deposits
- Bygpay::Deposit::Card
- Defined in:
- lib/bygpay/deposit/card.rb
Instance Attribute Summary
Attributes included from Utils
#amount, #meta_data, #response, #response_text, #result, #status, #transaction_id, #uuid
Instance Method Summary collapse
-
#charge(amount, card_data = {}) ⇒ Object
{ “card_number” : “4111111111111111”, “expiry_month”: 6, “expiry_year”: 2017, “cvv”: 618, “country”: “GH”, “currency”: “GHS” } Perform a Bankcard debit request.
Methods inherited from Bygpay::Deposits
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, card_data = {}) ⇒ Object
"card_number" : "4111111111111111",
"expiry_month": 6,
"expiry_year": 2017,
"cvv": 618,
"country": "GH",
"currency": "GHS"
Perform a Bankcard debit request
13 14 15 |
# File 'lib/bygpay/deposit/card.rb', line 13 def charge(amount, card_data = {}) post(card_deposit_endpoint, card_data.merge(amount: amount)) end |