Class: Cardia::Merchant
Overview
A merchant is the entity who requests payments/transactions. It is identified by a merchant token, which you’ll get from Cardia
Instance Attribute Summary collapse
-
#token ⇒ Object
Returns the value of attribute token.
Class Method Summary collapse
-
.test_merchant ⇒ Object
The test merchant.
-
.with_token(a_token) ⇒ Object
Create an instance with your real token.
Instance Attribute Details
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/cardia/merchant.rb', line 5 def token @token end |
Class Method Details
.test_merchant ⇒ Object
The test merchant. Using this merchant, no transactions are done for real.
9 10 11 12 13 |
# File 'lib/cardia/merchant.rb', line 9 def test_merchant m = self.new m.token = "CF4B6B54-6C28-4FA3-86B0-E9A347D75C6C" m end |
.with_token(a_token) ⇒ Object
Create an instance with your real token
16 17 18 19 20 |
# File 'lib/cardia/merchant.rb', line 16 def with_token(a_token) m = self.new m.token = a_token m end |