Package not found. Please check the package name and try again.

spree_core 3.3.3 → 3.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2733d8bdc6f559cdb36ce0472c8ee4ade4553661
4
- data.tar.gz: '092f9dea7f54cadb2ffee7411048e487f55a1dee'
3
+ metadata.gz: ef97b18bc947e484d5e2b6af1d3c79d1c4d3acc4
4
+ data.tar.gz: c544d43cc2f5699ec49ac9809de2b26ca987dfeb
5
5
  SHA512:
6
- metadata.gz: ecbd86b49f4c2cce96708c8d9b174b8ea50eee7f2e66a7c8764a291d0b11b3067495619e1359bd92c40dcc82e675b63c7885f3f029a2b95210fcf80c4fb99a4a
7
- data.tar.gz: f1287c901c06a5116fec3009f28a5a7649b2faf949537f6f8039582b7c4071135ab897de158644f21f92ef789a9f8ba42e75907e0cdf61dd0572fddfdf6d0533
6
+ metadata.gz: 21b387e7572157536d6e520802fd4b9832022fd03d2b2ba2edf0be1bb3e84d305ecac88d2fef304253bdc37b67582b4fad6290796be9174c8ce97a6e82cdb591
7
+ data.tar.gz: a4b127e56df213db4d280012ecf086501619a71c3b8f4a1dc42a6143581b02a50621267f9b8d7322f62821725b99fcb6dd462cc79ce30ef92082569a656203ce
@@ -622,6 +622,22 @@ module Spree
622
622
  promotions.pluck(:code).compact.first
623
623
  end
624
624
 
625
+ def payments_attributes=(attributes)
626
+ validate_payments_attributes(attributes)
627
+ super(attributes)
628
+ end
629
+
630
+ def validate_payments_attributes(attributes)
631
+ # Ensure the payment methods specified are allowed for this user
632
+ payment_methods = Spree::PaymentMethod.where(id: available_payment_methods.map(&:id))
633
+ attributes.each do |payment_attributes|
634
+ payment_method_id = payment_attributes[:payment_method_id]
635
+
636
+ # raise RecordNotFound unless it is an allowed payment method
637
+ payment_methods.find(payment_method_id) if payment_method_id
638
+ end
639
+ end
640
+
625
641
  private
626
642
 
627
643
  def link_by_email
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- "3.3.3"
3
+ "3.3.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.3
4
+ version: 3.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-08 00:00:00.000000000 Z
11
+ date: 2017-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant