Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Adds ability for developers to harden the security of payments and payment methods (#11576)

Damian Legawiecab448523bdc1
diff --git a/core/app/models/spree/payment.rb b/core/app/models/spree/payment.rb
index bf607053b0..086b11ae64 100644
--- a/core/app/models/spree/payment.rb
+++ b/core/app/models/spree/payment.rb
@@ -9,6 +9,9 @@ module Spree
if defined?(Spree::Webhooks)
include Spree::Webhooks::HasWebhooks
end
+ if defined?(Spree::Security::Payments)
+ include Spree::Security::Payments
+ end
include Spree::Payment::Processing
diff --git a/core/app/models/spree/payment_method.rb b/core/app/models/spree/payment_method.rb
index 79aef5d0ef..22b0c2b25b 100644
--- a/core/app/models/spree/payment_method.rb
+++ b/core/app/models/spree/payment_method.rb
@@ -5,6 +5,9 @@ module Spree
include MultiStoreResource
include Spree::Metadata
+ if defined?(Spree::Security::PaymentMethods)
+ include Spree::Security::PaymentMethods
+ end
DISPLAY = [:both, :front_end, :back_end].freeze