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.



896
897
898
899
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 896

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

Class Method Details

.messagesObject



892
893
894
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 892

def self.messages
  MESSAGES
end