Class: Paymob::PaymentTypes::Wallet

Inherits:
Base
  • Object
show all
Defined in:
lib/paymob/payment_types/wallet.rb

Constant Summary

Constants inherited from Base

Base::REQUIRED_BILLING_DATA_FIELDS, Base::REQUIRED_PAYMENT_FIELDS

Instance Attribute Summary

Attributes inherited from Base

#accept_api

Instance Method Summary collapse

Methods inherited from Base

#initialize_order

Instance Method Details

Raises:

  • (PaymentArgumentsMissing)


6
7
8
9
10
11
# File 'lib/paymob/payment_types/wallet.rb', line 6

def payment_link(mobile_number:)
  raise PaymentArgumentsMissing, 'Mobile number is required' if mobile_number.blank?

  @accept_api.wallet_payment(mobile_number)
  @accept_api.wallet_redirect_url
end