Class: PaypalServerSdk::PaymentAdviceCode
- Inherits:
-
Object
- Object
- PaypalServerSdk::PaymentAdviceCode
- Defined in:
- lib/paypal_server_sdk/models/payment_advice_code.rb
Overview
The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes.
Constant Summary collapse
- PAYMENT_ADVICE_CODE =
[ # For Mastercard, expired card account upgrade or portfolio sale # conversion. Obtain new account information before next billing cycle. PAYMENTADVICE_01 = '01'.freeze, # For Mastercard, over credit limit or insufficient funds. Retry the # transaction 72 hours later. For Visa, the card holder wants to stop only # one specific payment in the recurring payment relationship. The merchant # must NOT resubmit the same transaction. The merchant can continue the # billing process in the subsequent billing period. PAYMENTADVICE_02 = '02'.freeze, # For Mastercard, account closed as fraudulent. Obtain another type of # payment from customer due to account being closed or fraud. Possible # reason: Account closed as fraudulent. For Visa, the card holder wants to # stop all recurring payment transactions for a specific merchant. Stop # recurring payment requests. PAYMENTADVICE_03 = '03'.freeze, # For Mastercard, token requirements not fulfilled for this token type. PAYMENTADVICE_04 = '04'.freeze, # For Mastercard, the card holder has been unsuccessful at canceling # recurring payment through merchant. Stop recurring payment requests. For # Visa, all recurring payments were canceled for the card number # requested. Stop recurring payment requests. PAYMENTADVICE_21 = '21'.freeze, # For Mastercard, merchant does not qualify for product code. PAYMENTADVICE_22 = '22'.freeze, # For Mastercard, retry after 1 hour. PAYMENTADVICE_24 = '24'.freeze, # For Mastercard, retry after 24 hours. PAYMENTADVICE_25 = '25'.freeze, # For Mastercard, retry after 2 days. PAYMENTADVICE_26 = '26'.freeze, # For Mastercard, retry after 4 days. PAYMENTADVICE_27 = '27'.freeze, # For Mastercard, retry after 6 days. PAYMENTADVICE_28 = '28'.freeze, # For Mastercard, retry after 8 days. PAYMENTADVICE_29 = '29'.freeze, # For Mastercard, retry after 10 days . PAYMENTADVICE_30 = '30'.freeze, # For Mastercard, consumer non-reloadable prepaid card. PAYMENTADVICE_40 = '40'.freeze, # For Mastercard, consumer multi-use virtual card number. PAYMENTADVICE_43 = '43'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = PAYMENTADVICE_01) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/paypal_server_sdk/models/payment_advice_code.rb', line 75 def self.from_value(value, default_value = PAYMENTADVICE_01) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'paymentadvice_01' then PAYMENTADVICE_01 when 'paymentadvice_02' then PAYMENTADVICE_02 when 'paymentadvice_03' then PAYMENTADVICE_03 when 'paymentadvice_04' then PAYMENTADVICE_04 when 'paymentadvice_21' then PAYMENTADVICE_21 when 'paymentadvice_22' then PAYMENTADVICE_22 when 'paymentadvice_24' then PAYMENTADVICE_24 when 'paymentadvice_25' then PAYMENTADVICE_25 when 'paymentadvice_26' then PAYMENTADVICE_26 when 'paymentadvice_27' then PAYMENTADVICE_27 when 'paymentadvice_28' then PAYMENTADVICE_28 when 'paymentadvice_29' then PAYMENTADVICE_29 when 'paymentadvice_30' then PAYMENTADVICE_30 when 'paymentadvice_40' then PAYMENTADVICE_40 when 'paymentadvice_43' then PAYMENTADVICE_43 else default_value end end |
.validate(value) ⇒ Object
69 70 71 72 73 |
# File 'lib/paypal_server_sdk/models/payment_advice_code.rb', line 69 def self.validate(value) return false if value.nil? true end |