Class: CyberSourceMergedSpec::Emv1
- Defined in:
- lib/cyber_source_merged_spec/models/emv1.rb
Overview
Emv1 Model.
Instance Attribute Summary collapse
-
#chip_validation_result ⇒ String
Cryptogram validation results returned by the entity or service specified in
chipValidationType. -
#chip_validation_type ⇒ String
Entity or service that provided the validation results returned in
chipValidationResult. -
#tags ⇒ String
EMV data that is transmitted from the chip card to the issuer, and from the issuer to the chip card.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(tags: SKIP, chip_validation_type: SKIP, chip_validation_result: SKIP, additional_properties: nil) ⇒ Emv1
constructor
A new instance of Emv1.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ Object
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(tags: SKIP, chip_validation_type: SKIP, chip_validation_result: SKIP, additional_properties: nil) ⇒ Emv1
Returns a new instance of Emv1.
145 146 147 148 149 150 151 152 153 154 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 145 def initialize(tags: SKIP, chip_validation_type: SKIP, chip_validation_result: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @tags = unless == SKIP @chip_validation_type = chip_validation_type unless chip_validation_type == SKIP @chip_validation_result = chip_validation_result unless chip_validation_result == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#chip_validation_result ⇒ String
Cryptogram validation results returned by the entity or service specified
in chipValidationType.
Possible values:
A: Application cryptogram is valid, but the application transaction counter (ATC) is outside allowed range. (A large jump in ATC values may indicate data copying or other fraud.)C: Chip validation was completed successfully.E: Application cryptogram is valid but the ATC indicates possible replay fraud.F: Format error in the chip data.G: Application cryptogram is valid but is not a valid authorization request cryptogram (ARQC).I: Application cryptogram is invalid.T: Application cryptogram is valid but terminal verification results (TVR) or card verification results (CVR) are invalid.U: Application cryptogram could not be validated because of a technical error. This field is returned only for NFC payment network tokenization transactions with MasterCard. Note No CyberSource through VisaNet acquirers support EMV at this time.
120 121 122 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 120 def chip_validation_result @chip_validation_result end |
#chip_validation_type ⇒ String
Entity or service that provided the validation results returned in
chipValidationResult.
Possible values:
02: MasterCard on-behalf pre-validation service (The MasterCard authorization platform validated the M/Chip cryptogram before the authorization request reached the issuer.)03: MasterCard on-behalf stand-in service (The MasterCard authorization platform validated the M/Chip cryptogram because the issuer was not available.)50: Issuer90: Chip fall-back transaction downgrade process (The chip could not be read.) This field is returned only for NFC payment network tokenization transactions with MasterCard. Note No CyberSource through VisaNet acquirers support EMV at this time.
96 97 98 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 96 def chip_validation_type @chip_validation_type end |
#tags ⇒ String
EMV data that is transmitted from the chip card to the issuer, and from the issuer to the chip card. The EMV data is in the tag-length-value format and includes chip card tags, terminal tags, and transaction detail tags. For information about the individual tags, see the “Application Specification” section in the EMV 4.3 Specifications: http://emvco.com Note Card present information about EMV applies only to credit card processing and PIN debit processing. All other card present information applies only to credit card processing. PIN debit processing is available only on FDC Nashville Global. Important The following tags contain sensitive information and must not be included in this field:
56: Track 1 equivalent data57: Track 2 equivalent data5A: Application PAN5F20: Cardholder name5F24: Application expiration date (This sensitivity has been relaxed for Credit Mutuel-CIC, American Express Direct, FDC Nashville Global, First Data Merchant Solutions, and SIX)99: Transaction PIN9F0B: Cardholder name (extended)9F1F: Track 1 discretionary data9F20: Track 2 discretionary data For captures, this field is required for contact EMV transactions. Otherwise, it is optional. For credits, this field is required for contact EMV stand-alone credits and contactless EMV stand-alone credits. Otherwise, it is optional. Important For contact EMV captures, contact EMV stand-alone credits, and contactless EMV stand-alone credits, you must include the following tags in this field. For all other types of EMV transactions, the following tags are optional.95: Terminal verification results9F10: Issuer application data9F26: Application cryptogram
CyberSource through VisaNet
- In Japan: 199 bytes
- In other countries: String (252) For Mastercard Transactions, Optionally Tag 9F60 (Authenticated Application Data) and Tag 96 (Kernel Identifier - Terminal) can be included in the Field.
GPX
This field only supports transactions from the following card types:
- Visa
- Mastercard
- AMEX
- Discover
- Diners
- JCB
- Union Pay International
JCN Gateway
The following tags must be included:
4F: Application identifier84: Dedicated file name Data length: 199 bytes
All other processors:
String (999)
Used by
Authorization: Optional Authorization Reversal: Optional Credit: Optional PIN Debit processing (purchase, credit and reversal): Optional
77 78 79 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 77 def @tags end |
Class Method Details
.from_element(root) ⇒ Object
181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 181 def self.from_element(root) = XmlUtilities.from_element(root, 'tags', String) chip_validation_type = XmlUtilities.from_element(root, 'chipValidationType', String) chip_validation_result = XmlUtilities.from_element(root, 'chipValidationResult', String) new(tags: , chip_validation_type: chip_validation_type, chip_validation_result: chip_validation_result, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 157 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = hash.key?('tags') ? hash['tags'] : SKIP chip_validation_type = hash.key?('chipValidationType') ? hash['chipValidationType'] : SKIP chip_validation_result = hash.key?('chipValidationResult') ? hash['chipValidationResult'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. Emv1.new(tags: , chip_validation_type: chip_validation_type, chip_validation_result: chip_validation_result, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
123 124 125 126 127 128 129 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 123 def self.names @_hash = {} if @_hash.nil? @_hash['tags'] = 'tags' @_hash['chip_validation_type'] = 'chipValidationType' @_hash['chip_validation_result'] = 'chipValidationResult' @_hash end |
.nullables ⇒ Object
An array for nullable fields
141 142 143 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 141 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
132 133 134 135 136 137 138 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 132 def self.optionals %w[ tags chip_validation_type chip_validation_result ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
219 220 221 222 223 224 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 219 def inspect class_name = self.class.name.split('::').last "<#{class_name} tags: #{@tags.inspect}, chip_validation_type:"\ " #{@chip_validation_type.inspect}, chip_validation_result:"\ " #{@chip_validation_result.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
211 212 213 214 215 216 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 211 def to_s class_name = self.class.name.split('::').last "<#{class_name} tags: #{@tags}, chip_validation_type: #{@chip_validation_type},"\ " chip_validation_result: #{@chip_validation_result}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/cyber_source_merged_spec/models/emv1.rb', line 196 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'tags', ) XmlUtilities.add_as_subelement(doc, root, 'chipValidationType', chip_validation_type) XmlUtilities.add_as_subelement(doc, root, 'chipValidationResult', chip_validation_result) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |