Class: ActiveMerchant::Billing::SecurePayGateway
- Defined in:
- lib/active_merchant/billing/gateways/secure_pay.rb
Constant Summary collapse
- API_VERSION =
'3.1'
- CARD_CODE_ERRORS =
%w(N S)
- AVS_ERRORS =
%w(A E N R W Z)
- AVS_REASON_CODES =
%w(27 45)
- TRANSACTION_ALREADY_ACTIONED =
%w(310 311)
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 = {}) ⇒ SecurePayGateway
constructor
A new instance of SecurePayGateway.
- #purchase(money, paysource, 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 = {}) ⇒ SecurePayGateway
Returns a new instance of SecurePayGateway.
29 30 31 32 |
# File 'lib/active_merchant/billing/gateways/secure_pay.rb', line 29 def initialize( = {}) requires!(, :login, :password) super end |
Instance Method Details
#purchase(money, paysource, options = {}) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/active_merchant/billing/gateways/secure_pay.rb', line 34 def purchase(money, paysource, = {}) post = {} add_currency_code(post, money, ) add_invoice(post, ) add_payment_source(post, paysource, ) add_address(post, ) add_customer_data(post, ) add_duplicate_window(post) commit('AUTH_CAPTURE', money, post) end |