Class: Payzilla::Payment
- Inherits:
-
Object
- Object
- Payzilla::Payment
- Defined in:
- lib/payzilla/payment.rb
Constant Summary collapse
- TYPE_CASH =
0
- TYPE_INNER_CARD =
1
- TYPE_FOREIGN_CARD =
2
- TYPE_IBANK =
3
- TYPE_ACCOUNT =
4
Instance Attribute Summary collapse
-
#account ⇒ Object
Account, which you need to replenish.
-
#agent_id ⇒ Object
Agent identifier.
-
#commision_amount ⇒ Object
Amount of commision, that would be subtracted from enrolled amount.
-
#commission_amount ⇒ Object
Returns the value of attribute commission_amount.
-
#created_at ⇒ Object
Paymend creatiton date.
-
#discount_card ⇒ Object
Client’s discount card.
-
#enrolled_amount ⇒ Object
Amount of money, that client will recieve.
-
#fields ⇒ Object
Additional params, that can be passed into payment.
-
#gateway_payment_id ⇒ Object
Gateway payment idetifier.
-
#gateway_provider_id ⇒ Object
Gateway provider identifier.
-
#id ⇒ Object
Paymen identifier.
-
#paid_amount ⇒ Object
Amount of money, that client put into kiosk.
-
#payment_type ⇒ Object
Chose payment type.
-
#subagent_id ⇒ Object
Subagent identifier.
-
#terminal_id ⇒ Object
Terminal identifier.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Payment
constructor
A new instance of Payment.
Constructor Details
#initialize(args = {}) ⇒ Payment
Returns a new instance of Payment.
155 156 157 158 159 |
# File 'lib/payzilla/payment.rb', line 155 def initialize(args={}) payment_type = self::TYPE_CASH args.each{|k,v| send "#{k}=", v} end |
Instance Attribute Details
#account ⇒ Object
Account, which you need to replenish
Used by:
-
Akado
-
Beeline
-
Cyberplat
-
Matrix
-
Megafon
-
MTS
-
OSMP
-
Skylink
-
Yamoney
-
Yota
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#agent_id ⇒ Object
Agent identifier
Used by:
-
Cyberplat
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#commision_amount ⇒ Object
Amount of commision, that would be subtracted from enrolled amount
Used by:
-
Rapida
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#commission_amount ⇒ Object
Returns the value of attribute commission_amount.
144 145 146 |
# File 'lib/payzilla/payment.rb', line 144 def commission_amount @commission_amount end |
#created_at ⇒ Object
If in this list format is missing, than you can use default DateTime.now without any formating
Paymend creatiton date
Used by:
-
Akado. Format: YYYY-MM-DD HH24:MI:SS by Moscow local time
-
Beeline
-
Matrix. Format: YYYY-MM-DD HH24:MI:SS by Moscow local time
-
Megafon
-
MTS
-
Skylink
-
Yota. Format: YYYY-MM-DDTHH24:MI:SS by Moscow local time
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#discount_card ⇒ Object
Client’s discount card
Used by:
-
Beeline optional
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#enrolled_amount ⇒ Object
Missing format in this list mens, that you should use integer value without coins
Amount of money, that client will recieve
Used by:
-
Akado. Format: 100.00
-
Beeline
-
Cyberplat
-
Mailru
-
Matrix
-
Megafon
-
MTS. Format: 100.00
-
OSMP
-
Rapida
-
Skylink
-
Webmoney
-
Yamoney
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#fields ⇒ Object
Additional params, that can be passed into payment
Used by:
-
Cyberplat
-
Rapida
-
Webmoney
-
phone - account, you need to pay to
-
purse - currency
-
name - your name
-
passport_serie
-
passport_date
-
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#gateway_payment_id ⇒ Object
Gateway payment idetifier. You can get it by parsing response of check method
Used by:
-
Matrix
-
MTS
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#gateway_provider_id ⇒ Object
Gateway provider identifier
Used by:
-
MTS
-
OSMP
-
Rapida
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#id ⇒ Object
Should be unique for each paymet (For example current time plus some salt)
Paymen identifier
Used by:
-
Akado
-
Beeline
-
Cyberplat
-
Mailru
-
Matrix
-
Megafon
-
MTS
-
OSMP
-
Rapida
-
Skylink
-
Webmoney
-
Yamoney
-
Yota
144 145 146 |
# File 'lib/payzilla/payment.rb', line 144 def id @id end |
#paid_amount ⇒ Object
Amount of money, that client put into kiosk
Used by:
-
Beeline
-
OSMP
-
Skylink
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#payment_type ⇒ Object
Chose payment type. On the left side is ‘what you want’, and on the right - what you should pass
-
Cash | self::TYPE_CASH
-
Inner card | self::TYPE_INNER_CARD
-
Foreign card | self::TYPE_FOREIGN_CARD
-
Bank account | self::TYPE_IBANK
-
Account | self::TYPE_ACCOUNT
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#subagent_id ⇒ Object
Subagent identifier
Used by:
-
Beeline. optional
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |
#terminal_id ⇒ Object
Terminal identifier
Used by:
-
Cyberplat
-
MTS
-
Rapida
144 145 146 147 |
# File 'lib/payzilla/payment.rb', line 144 attr_accessor :id, :account, :created_at, :enrolled_amount, :paid_amount, :terminal_id, :gateway_provider_id, :discount_card, :subagent_id, :agent_id, :fields, :commission_amount, :payment_type |