Class: ActiveMerchant::Billing::OrbitalGateway::CVVResult

Inherits:
CVVResult
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/orbital.rb

Overview

Unfortunately, Orbital uses their own special codes for CVV responses that are different than the standard codes defined in ActiveMerchant::Billing::CVVResult.

This class encapsulates the response codes shown on page 255 of their spec: download.chasepaymentech.com/docs/orbital/orbital_gateway_xml_specification.pdf

Constant Summary collapse

MESSAGES =
{
  'M' => 'Match',
  'N' => 'No match',
  'P' => 'Not processed',
  'S' => 'Should have been present',
  'U' => 'Unsupported by issuer/Issuer unable to process request',
  'I' => 'Invalid',
  'Y' => 'Invalid',
  ''  => 'Not applicable'
}

Instance Attribute Summary

Attributes inherited from CVVResult

#code, #message

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CVVResult

#to_hash

Constructor Details

#initialize(code) ⇒ CVVResult

Returns a new instance of CVVResult.



916
917
918
919
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 916

def initialize(code)
  @code = code.blank? ? '' : code.upcase
  @message = MESSAGES[@code]
end

Class Method Details

.messagesObject



912
913
914
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 912

def self.messages
  MESSAGES
end