Class: ActiveMerchant::Billing::PaySecureGateway
- Defined in:
- lib/active_merchant/billing/gateways/pay_secure.rb
Constant Summary collapse
- TRANSACTIONS =
Currently Authorization and Capture is not implemented because capturing requires the original credit card information
{ :purchase => 'PURCHASE', :authorization => 'AUTHORISE', :capture => 'ADVICE', :credit => 'REFUND' }
- SUCCESS =
'Accepted'
- SUCCESS_MESSAGE =
'The transaction was approved'
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PaySecureGateway
constructor
A new instance of PaySecureGateway.
- #purchase(money, credit_card, options = {}) ⇒ Object
Methods inherited from Gateway
#add_field_to_post_if_present, #add_fields_to_post_if_present, #card_brand, card_brand, #generate_unique_id, inherited, #scrub, #supported_countries, supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?, #test?
Methods included from CreditCardFormatting
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ PaySecureGateway
Returns a new instance of PaySecureGateway.
25 26 27 28 |
# File 'lib/active_merchant/billing/gateways/pay_secure.rb', line 25 def initialize( = {}) requires!(, :login, :password) super end |
Instance Method Details
#purchase(money, credit_card, options = {}) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/active_merchant/billing/gateways/pay_secure.rb', line 30 def purchase(money, credit_card, = {}) requires!(, :order_id) post = {} add_amount(post, money) add_invoice(post, ) add_credit_card(post, credit_card) commit(:purchase, money, post) end |