Class: PaypalServerSdk::VaultCardVerificationMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/paypal_server_sdk/models/vault_card_verification_method.rb

Overview

The verification method of the card.

Constant Summary collapse

VAULT_CARD_VERIFICATION_METHOD =
[
  # When an authorization or transaction is attempted this option will

  # return a contingency and HATEOAS link only when local regulations

  # require strong customer authentication, (e.g. 3DS in countries and use

  # cases where it is mandated). The API caller should redirect the payer to

  # the link so that they can authenticate themselves. In all cases, when an

  # authorization is requested the AVS/CVV results will be returned in the

  # response.

  SCA_WHEN_REQUIRED = 'SCA_WHEN_REQUIRED'.freeze,

  # Selecting this option will attempt to force a strong customer

  # authentication for the authorization/transaction. In countries where SCA

  # has been defined and implemented it will result in a contingency and

  # HATEOAS link being returned.  The API caller should redirect the payer

  # to that link so that they can authenticate themselves against their

  # issuing bank or other entity. As noted, the HATEOAS link is only

  # available in all regions where strong authentication is supported, (e.g.

  # in European countries where 3DS is live). Merchants can use this setting

  # as an additional layer of security if they choose to. In all cases, when

  # an authorization is requested the AVS/CVV results will be returned in

  # the response.

  SCA_ALWAYS = 'SCA_ALWAYS'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = SCA_WHEN_REQUIRED) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/paypal_server_sdk/models/vault_card_verification_method.rb', line 39

def self.from_value(value, default_value = SCA_WHEN_REQUIRED)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'sca_when_required' then SCA_WHEN_REQUIRED
  when 'sca_always' then SCA_ALWAYS
  else
    default_value
  end
end

.validate(value) ⇒ Object



33
34
35
36
37
# File 'lib/paypal_server_sdk/models/vault_card_verification_method.rb', line 33

def self.validate(value)
  return false if value.nil?

  true
end