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.



1239
1240
1241
1242
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 1239

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

Class Method Details

.messagesObject



1235
1236
1237
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 1235

def self.messages
  MESSAGES
end