Class: PaypalServerSdk::CheckoutPaymentIntent
- Inherits:
-
Object
- Object
- PaypalServerSdk::CheckoutPaymentIntent
- Defined in:
- lib/paypal_server_sdk/models/checkout_payment_intent.rb
Overview
The intent to either capture payment immediately or authorize a payment for an order after order creation.
Constant Summary collapse
- CHECKOUT_PAYMENT_INTENT =
[ # The merchant intends to capture payment immediately after the customer # makes a payment. CAPTURE = 'CAPTURE'.freeze, # The merchant intends to authorize a payment and place funds on hold # after the customer makes a payment. Authorized payments are best # captured within three days of authorization but are available to capture # for up to 29 days. After the three-day honor period, the original # authorized payment expires and you must re-authorize the payment. You # must make a separate request to capture payments on demand. This intent # is not supported when you have more than one `purchase_unit` within your # order. AUTHORIZE = 'AUTHORIZE'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = CAPTURE) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/paypal_server_sdk/models/checkout_payment_intent.rb', line 32 def self.from_value(value, default_value = CAPTURE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'capture' then CAPTURE when 'authorize' then AUTHORIZE else default_value end end |
.validate(value) ⇒ Object
26 27 28 29 30 |
# File 'lib/paypal_server_sdk/models/checkout_payment_intent.rb', line 26 def self.validate(value) return false if value.nil? true end |