ActiveMerchant PSL Card Gateway
Notes:
-To be able to use the capture function, the IP address of the machine must be registered with PSL -ESALE_KEYED should only be used in situations where the cardholder perceives the transaction to be Internet-based, such as purchasing from a web site/on-line store. If the Internet is used purely for the transport of information from the merchant directly to the gateway then the appropriate cardholder present or not present message type should be used rather than the ‘E’ equivalent. -The CV2 / AVS policies are set up with the account settings when signing up for an account
Return codes
Currency Codes
Different Dispatch types
The terminal used - only for swipe transactions, so hard coded to 32 for online
eCommerce sale transaction, details keyed by merchant or cardholder
Nominal amount to authorize for a ‘dispatch later’ type The nominal amount is held straight away, when the goods are ready to be dispatched, PSL is informed and the full amount is the taken.
The type of response that we want to get from PSL, options are HTML, XML or REDIRECT
PslCard server URL - The url is the same whether testing or live - use the test account when testing…
Create a new PslCardGateway
The gateway requires that a valid :login be passed in the options hash
Paramaters:
-options: :login - the PslCard account login (required)
# File lib/active_merchant/billing/gateways/psl_card.rb, line 90 def initialize(options = {}) requires!(options, :login) @options = options super end
Post an authorization.
Captures the funds from an authorized transaction.
Parameters:
-money: Amount to be charged as an Integer value in cents -authorization: The PSL Cross Reference -options:
Returns:
-ActiveRecord::Billing::Response object
# File lib/active_merchant/billing/gateways/psl_card.rb, line 159 def capture(money, authorization, options = {}) post = {} add_amount(post, money, DISPATCH_NOW, options) add_reference(post, authorization) add_purchase_details(post) commit(post) end
Purchase the item straight away
Parameters:
-money: Amount to be charged as an Integer value in cents -authorization: the PSL cross reference from the previous authorization -options:
Returns:
-ActiveRecord::Billing::Response object
# File lib/active_merchant/billing/gateways/psl_card.rb, line 107 def purchase(money, credit_card, options = {}) post = {} add_amount(post, money, DISPATCH_NOW, options) add_credit_card(post, credit_card) add_address(post, options) add_invoice(post, options) add_purchase_details(post) commit(post) end
Generated with the Darkfish Rdoc Generator 2.