Module: UnlockGateway::Models::Gateway
- Defined in:
- lib/unlock_gateway/models/gateway.rb
Overview
Your module UnlockMyGatewayName::Models::Gateway, that should implement this interface, will be included in Unlock’s Gateway model. All methods will run in the context of an instance of Gateway model.
Instance Method Summary collapse
-
#available_settings ⇒ Object
This method should return an Array of UnlockGateway::Setting that will be displayed when configuring the gateway’s settings.
-
#description ⇒ Object
This method should return the description of the payment gateway to be displayed in Unlock’s gateways configurations.
-
#has_sandbox? ⇒ Boolean
This method should return true if the gateway has a sandbox alternative and false if not.
-
#image ⇒ Object
This method should return the image PATH of the payment gateway to be displayed in Unlock’s gateways configurations, such as ‘my_gateway/logo.png’.
-
#name ⇒ Object
This method should return the name of the payment gateway to be displayed in Unlock’s gateways configurations.
-
#path ⇒ Object
This method should return the path for the routes generated by the gateway, such as ‘/my_gateway’.
Instance Method Details
#available_settings ⇒ Object
This method should return an Array of UnlockGateway::Setting that will be displayed when configuring the gateway’s settings. Here is the place for API keys, etc.
30 31 32 |
# File 'lib/unlock_gateway/models/gateway.rb', line 30 def available_settings [] end |
#description ⇒ Object
This method should return the description of the payment gateway to be displayed in Unlock’s gateways configurations.
13 14 |
# File 'lib/unlock_gateway/models/gateway.rb', line 13 def description end |
#has_sandbox? ⇒ Boolean
This method should return true if the gateway has a sandbox alternative and false if not.
25 26 27 |
# File 'lib/unlock_gateway/models/gateway.rb', line 25 def has_sandbox? true end |
#image ⇒ Object
This method should return the image PATH of the payment gateway to be displayed in Unlock’s gateways configurations, such as ‘my_gateway/logo.png’.
17 18 |
# File 'lib/unlock_gateway/models/gateway.rb', line 17 def image end |
#name ⇒ Object
This method should return the name of the payment gateway to be displayed in Unlock’s gateways configurations.
8 9 10 |
# File 'lib/unlock_gateway/models/gateway.rb', line 8 def name self.module_name end |
#path ⇒ Object
This method should return the path for the routes generated by the gateway, such as ‘/my_gateway’.
21 22 |
# File 'lib/unlock_gateway/models/gateway.rb', line 21 def path end |