Class: PayCertify::Gateway
- Inherits:
-
Object
- Object
- PayCertify::Gateway
- Defined in:
- lib/paycertify/gateway.rb,
lib/paycertify/gateway/base.rb,
lib/paycertify/gateway/charge.rb,
lib/paycertify/gateway/client.rb,
lib/paycertify/gateway/customer.rb,
lib/paycertify/gateway/response.rb,
lib/paycertify/gateway/credit_card.rb,
lib/paycertify/gateway/transaction.rb,
lib/paycertify/gateway/base/resource.rb,
lib/paycertify/gateway/base/validation.rb,
lib/paycertify/gateway/attribute_mapping.rb
Defined Under Namespace
Modules: AttributeMapping, Base Classes: Charge, Client, CreditCard, Customer, Response, Transaction
Constant Summary collapse
- CREDENTIALS_PATH =
'/ws/encgateway2.asmx/GetCredential'
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.mode ⇒ Object
Returns the value of attribute mode.
-
.vendor ⇒ Object
Returns the value of attribute vendor.
Class Method Summary collapse
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
17 18 19 |
# File 'lib/paycertify/gateway.rb', line 17 def api_key @api_key end |
.mode ⇒ Object
Returns the value of attribute mode.
17 18 19 |
# File 'lib/paycertify/gateway.rb', line 17 def mode @mode end |
.vendor ⇒ Object
Returns the value of attribute vendor.
17 18 19 |
# File 'lib/paycertify/gateway.rb', line 17 def vendor @vendor end |
Class Method Details
.configure {|_self| ... } ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/paycertify/gateway.rb', line 19 def configure(&block) yield self if block_given? client = PayCertify::Gateway::Client.new(api_key: api_key, mode: mode) response = client.get(path: CREDENTIALS_PATH) self.vendor = response['response']['vendor'] return { api_key: api_key, mode: mode, vendor: vendor } end |