Class: VisaAcceptanceMergedSpec::Emv
- Defined in:
- lib/visa_acceptance_merged_spec/models/emv.rb
Overview
Emv Model.
Instance Attribute Summary collapse
-
#card_sequence_number ⇒ String
Number assigned to a specific card when two or more cards are associated with the same primary account number.
-
#cardholder_verification_method_used ⇒ Integer
Method that was used to verify the cardholder's identity.
-
#fallback ⇒ TrueClass | FalseClass
Indicates whether a fallback method was used to enter credit card information into the POS terminal.
-
#fallback_condition ⇒ Integer
Reason for the EMV fallback transaction.
-
#is_repeat ⇒ TrueClass | FalseClass
Visa Platform Connect Value “true” indicates this transaction is intentionally duplicated .
-
#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_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, cardholder_verification_method_used: SKIP, card_sequence_number: SKIP, fallback: SKIP, fallback_condition: SKIP, is_repeat: SKIP, additional_properties: nil) ⇒ Emv
constructor
A new instance of Emv.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the 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, cardholder_verification_method_used: SKIP, card_sequence_number: SKIP, fallback: SKIP, fallback_condition: SKIP, is_repeat: SKIP, additional_properties: nil) ⇒ Emv
Returns a new instance of Emv.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 203 def initialize(tags: SKIP, cardholder_verification_method_used: SKIP, card_sequence_number: SKIP, fallback: SKIP, fallback_condition: SKIP, is_repeat: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @tags = unless == SKIP unless cardholder_verification_method_used == SKIP @cardholder_verification_method_used = cardholder_verification_method_used end @card_sequence_number = card_sequence_number unless card_sequence_number == SKIP @fallback = fallback unless fallback == SKIP @fallback_condition = fallback_condition unless fallback_condition == SKIP @is_repeat = is_repeat unless is_repeat == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#card_sequence_number ⇒ String
Number assigned to a specific card when two or more cards are associated with the same primary account number. This value enables issuers to distinguish among multiple cards that are linked to the same account. This value can also act as a tracking tool when reissuing cards. When this value is available, it is provided by the chip reader. When the chip reader does not provide this value, do not include this field in your request. When sequence number is not provided via this API field, the value is extracted from EMV tag 5F34 for Visa and Mastercard transactions. To enable this feature please call support. 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 Visa Acceptance through VisaNet and FDC Nashville Global.
Used by
Authorization: Optional PIN Debit processing: Optional
GPX
This field only supports transactions from the following card types:
- Visa
- Mastercard
- AMEX
- Discover
- Diners
- JCB
- Union Pay International
117 118 119 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 117 def card_sequence_number @card_sequence_number end |
#cardholder_verification_method_used ⇒ Integer
Method that was used to verify the cardholder's identity. Possible values:
0: No verification1: Signature This field is supported only on American Express Direct.
85 86 87 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 85 def cardholder_verification_method_used @cardholder_verification_method_used end |
#fallback ⇒ TrueClass | FalseClass
Indicates whether a fallback method was used to enter credit card information into the POS terminal. When a technical problem prevents a successful exchange of information between a chip card and a chip-capable terminal:
- Swipe the card or key the credit card information into the POS terminal.
- Use the pointOfSaleInformation.entryMode field to indicate whether the information was swiped or keyed. Possible values:
true: Fallback method was used.false(default): Fallback method was not used. This field is supported only on American Express Direct, Chase Paymentech Solutions, Visa Acceptance through VisaNet, FDC Nashville Global, GPN, JCN Gateway, OmniPay Direct, and SIX.
134 135 136 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 134 def fallback @fallback end |
#fallback_condition ⇒ Integer
Reason for the EMV fallback transaction. An EMV fallback transaction occurs when an EMV transaction fails for one of these reasons:
- Technical failure: the EMV terminal or EMV card cannot read and process chip data.
- Empty candidate list failure: the EMV terminal does not have any applications in common with the EMV card. EMV terminals are coded to determine whether the terminal and EMV card have any applications in common. EMV terminals provide this information to you. Possible values:
1: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal either used information from a successful chip read or it was not a chip transaction.2: Transaction was initiated with information from a magnetic stripe, and the previous transaction at the EMV terminal was an EMV fallback transaction because the attempted chip read was unsuccessful. This field is supported only on GPN and JCN Gateway. NOTE: This field is required when an EMV transaction fails for a technical reason. Do not include this field when the EMV terminal does not have any applications in common with the EMV card.
161 162 163 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 161 def fallback_condition @fallback_condition end |
#is_repeat ⇒ TrueClass | FalseClass
Visa Platform Connect
Value “true” indicates this transaction is intentionally duplicated . The field contains value “true” which indicates that merchant has intentionally duplicated single tap transaction. Merchant is intentionally sending a duplicate auth request for a single tap txn because the issuer requested a PIN.
171 172 173 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 171 def is_repeat @is_repeat 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: 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
Visa Acceptance 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/visa_acceptance_merged_spec/models/emv.rb', line 77 def @tags end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 223 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = hash.key?('tags') ? hash['tags'] : SKIP cardholder_verification_method_used = hash.key?('cardholderVerificationMethodUsed') ? hash['cardholderVerificationMethodUsed'] : SKIP card_sequence_number = hash.key?('cardSequenceNumber') ? hash['cardSequenceNumber'] : SKIP fallback = hash.key?('fallback') ? hash['fallback'] : SKIP fallback_condition = hash.key?('fallbackCondition') ? hash['fallbackCondition'] : SKIP is_repeat = hash.key?('isRepeat') ? hash['isRepeat'] : 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. Emv.new(tags: , cardholder_verification_method_used: cardholder_verification_method_used, card_sequence_number: card_sequence_number, fallback: fallback, fallback_condition: fallback_condition, is_repeat: is_repeat, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 174 def self.names @_hash = {} if @_hash.nil? @_hash['tags'] = 'tags' @_hash['cardholder_verification_method_used'] = 'cardholderVerificationMethodUsed' @_hash['card_sequence_number'] = 'cardSequenceNumber' @_hash['fallback'] = 'fallback' @_hash['fallback_condition'] = 'fallbackCondition' @_hash['is_repeat'] = 'isRepeat' @_hash end |
.nullables ⇒ Object
An array for nullable fields
199 200 201 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 199 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
187 188 189 190 191 192 193 194 195 196 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 187 def self.optionals %w[ tags cardholder_verification_method_used card_sequence_number fallback fallback_condition is_repeat ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
264 265 266 267 268 269 270 271 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 264 def inspect class_name = self.class.name.split('::').last "<#{class_name} tags: #{@tags.inspect}, cardholder_verification_method_used:"\ " #{@cardholder_verification_method_used.inspect}, card_sequence_number:"\ " #{@card_sequence_number.inspect}, fallback: #{@fallback.inspect}, fallback_condition:"\ " #{@fallback_condition.inspect}, is_repeat: #{@is_repeat.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
255 256 257 258 259 260 261 |
# File 'lib/visa_acceptance_merged_spec/models/emv.rb', line 255 def to_s class_name = self.class.name.split('::').last "<#{class_name} tags: #{@tags}, cardholder_verification_method_used:"\ " #{@cardholder_verification_method_used}, card_sequence_number: #{@card_sequence_number},"\ " fallback: #{@fallback}, fallback_condition: #{@fallback_condition}, is_repeat:"\ " #{@is_repeat}, additional_properties: #{@additional_properties}>" end |