module UnlockGateway::Models::Gateway

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.

Public Instance Methods

available_settings() click to toggle source

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.

# File lib/unlock_gateway/models/gateway.rb, line 34
def available_settings
  []
end
description() click to toggle source

This method should return the description of the payment gateway to be displayed in Unlock's gateways configurations.

# File lib/unlock_gateway/models/gateway.rb, line 13
def description
end
has_sandbox?() click to toggle source

This method should return true if the gateway has a sandbox alternative and false if not.

# File lib/unlock_gateway/models/gateway.rb, line 29
def has_sandbox?
  true
end
image() click to toggle source

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'.

# File lib/unlock_gateway/models/gateway.rb, line 17
def image
end
name() click to toggle source

This method should return the name of the payment gateway to be displayed in Unlock's gateways configurations.

# File lib/unlock_gateway/models/gateway.rb, line 8
def name
  self.module_name
end
path() click to toggle source

This method should return the path for the routes generated by the gateway, such as '/my_gateway'.

# File lib/unlock_gateway/models/gateway.rb, line 25
def path
end
url() click to toggle source

This method should return the gateways institutional website URL, to which Unlock will refer users.

# File lib/unlock_gateway/models/gateway.rb, line 21
def url
end