Class: ActiveMerchant::Billing::PacNetRavenGateway
- Defined in:
- lib/active_merchant/billing/gateways/pac_net_raven.rb
Constant Summary collapse
- AVS_ADDRESS_CODES =
{ 'avs_address_unavailable' => 'X', 'avs_address_not_checked' => 'X', 'avs_address_matched' => 'Y', 'avs_address_not_matched' => 'N', 'avs_address_partial_match' => 'N' }
- AVS_POSTAL_CODES =
{ 'avs_postal_unavailable' => 'X', 'avs_postal_not_checked' => 'X', 'avs_postal_matched' => 'Y', 'avs_postal_not_matched' => 'N', 'avs_postal_partial_match' => 'N' }
- CVV2_CODES =
{ 'cvv2_matched' => 'Y', 'cvv2_not_matched' => 'N', 'cvv2_unavailable' => 'X', 'cvv2_not_checked' => 'X' }
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
- #authorize(money, creditcard, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ PacNetRavenGateway
constructor
A new instance of PacNetRavenGateway.
- #purchase(money, creditcard, options = {}) ⇒ Object
- #refund(money, template_number, options = {}) ⇒ Object
- #void(authorization, 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
#expdate, #format, #strftime_yyyymm
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ PacNetRavenGateway
Returns a new instance of PacNetRavenGateway.
37 38 39 40 |
# File 'lib/active_merchant/billing/gateways/pac_net_raven.rb', line 37 def initialize( = {}) requires!(, :user, :secret, :prn) super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/active_merchant/billing/gateways/pac_net_raven.rb', line 42 def (money, creditcard, = {}) post = {} add_creditcard(post, creditcard) add_currency_code(post, money, ) add_address(post, ) post['PRN'] = @options[:prn] commit('cc_preauth', money, post) end |
#capture(money, authorization, options = {}) ⇒ Object
70 71 72 73 74 75 76 77 |
# File 'lib/active_merchant/billing/gateways/pac_net_raven.rb', line 70 def capture(money, , = {}) post = {} post['PreauthNumber'] = post['PRN'] = @options[:prn] add_currency_code(post, money, ) commit('cc_settle', money, post) end |
#purchase(money, creditcard, options = {}) ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'lib/active_merchant/billing/gateways/pac_net_raven.rb', line 52 def purchase(money, creditcard, = {}) post = {} add_currency_code(post, money, ) add_creditcard(post, creditcard) add_address(post, ) post['PRN'] = @options[:prn] commit('cc_debit', money, post) end |
#refund(money, template_number, options = {}) ⇒ Object
79 80 81 82 83 84 85 86 |
# File 'lib/active_merchant/billing/gateways/pac_net_raven.rb', line 79 def refund(money, template_number, = {}) post = {} post['PRN'] = @options[:prn] post['TemplateNumber'] = template_number add_currency_code(post, money, ) commit('cc_refund', money, post) end |
#void(authorization, options = {}) ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/active_merchant/billing/gateways/pac_net_raven.rb', line 62 def void(, = {}) post = {} post['TrackingNumber'] = post['PymtType'] = [:pymt_type] commit('void', nil, post) end |