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.



1202
1203
1204
1205
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 1202

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

Class Method Details

.messagesObject



1198
1199
1200
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 1198

def self.messages
  MESSAGES
end