Module: Spree::PaypalPlatform

Defined in:
lib/spree/paypal_platform.rb,
lib/spree/paypal_platform/engine.rb,
lib/spree/paypal_platform/version.rb,
app/models/spree/paypal_platform/base.rb,
app/models/spree/paypal_platform/order.rb,
app/models/spree/paypal_platform/gateway.rb,
app/models/spree/paypal_platform/order_decorator.rb,
app/models/spree/paypal_platform/store_decorator.rb,
app/services/spree/paypal_platform/capture_order.rb,
app/services/spree/paypal_platform/create_source.rb,
app/services/spree/paypal_platform/create_payment.rb,
app/presenters/spree/paypal_platform/order_presenter.rb,
app/models/spree/paypal_platform/payment_sources/card.rb,
app/models/spree/paypal_platform/payment_sources/paypal.rb,
app/models/spree/paypal_platform/gateway/payment_sessions.rb,
app/models/spree/paypal_platform/payment_method_decorator.rb,
app/models/spree/paypal_platform/payment_sources/apple_pay.rb,
lib/generators/spree/paypal_platform/install/install_generator.rb

Defined Under Namespace

Modules: Generators, OrderDecorator, PaymentMethodDecorator, PaymentSources, StoreDecorator Classes: Base, CaptureOrder, CreatePayment, CreateSource, Engine, Gateway, Order, OrderPresenter

Constant Summary collapse

VERSION =

Major version tracks Spree's major version: 5.x supports Spree 5.x.

'5.1.0'

Class Method Summary collapse

Class Method Details

.gateway_type_namesArray<String>

STI type names that count as this gem's gateway.

Includes historical strings from the official spree_paypal_checkout gem and the short-lived Spree::PaypalCheckout name so existing payment-method rows keep matching before the rewrite migration runs.

Returns:

  • (Array<String>)


32
33
34
35
36
37
38
39
40
# File 'lib/spree/paypal_platform.rb', line 32

def self.gateway_type_names
  (
    [
      Gateway.name,
      'Spree::PaypalCheckout::Gateway',
      'SpreePaypalCheckout::Gateway'
    ] + Gateway.descendants.map(&:name)
  ).uniq
end

.table_name_prefixString

Table prefix for models nested under this module.

Must live on the module, not on Base. ActiveRecord walks module_parents for table_name_prefix and finds Spree first ("spree_") unless this closer parent defines it.

Returns:

  • (String)


19
20
21
# File 'lib/spree/paypal_platform.rb', line 19

def self.table_name_prefix
  'spree_paypal_platform_'
end