spree_stripe 1.7.0 → 1.7.1
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 29e7b17d5c521a1ecabbff665256fabda9299e5f5121d2b60f23ba102f386b7b
|
|
4
|
+
data.tar.gz: ab6a21916a2b08f1772227bb5f9261e286f9c9350d7b775f220de530bdb8f6f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 765382a672704ba2660861fd1f145b43ca0418c534c63e817db38983f6cdf84d770e3ea2e870e40765a22b3ad0a7e44e4b0d368c79518ad3a10c17357f7666bf
|
|
7
|
+
data.tar.gz: 1aec94ce6369b320efc11e2697560c4c07106ac67f3f66227e4fa0d1d48a15cda0972ffe892e3c6bcd35f0230718eed32459a845e685242f713dd3e4b0f2eacf
|
|
@@ -15,7 +15,7 @@ module SpreeStripe
|
|
|
15
15
|
total = amount.presence || order.total_minus_store_credits
|
|
16
16
|
amount_in_cents = Spree::Money.new(total, currency: order.currency).cents
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
raise Spree::Core::GatewayError, I18n.t('spree.stripe.payment_session_errors.zero_amount') if amount_in_cents.zero?
|
|
19
19
|
|
|
20
20
|
customer = fetch_or_create_customer(order: order)
|
|
21
21
|
stripe_pm_id = external_data[:stripe_payment_method_id] || external_data['stripe_payment_method_id']
|
data/config/locales/en.yml
CHANGED
|
@@ -12,7 +12,10 @@ module Spree
|
|
|
12
12
|
spree_authorize! :update, spree_current_order, order_token
|
|
13
13
|
|
|
14
14
|
stripe_payment_method_id = permitted_attributes[:stripe_payment_method_id].presence
|
|
15
|
-
stripe_payment_method_id ||=
|
|
15
|
+
stripe_payment_method_id ||= Spree::CreditCard.where(
|
|
16
|
+
id: spree_current_order.payments.from_credit_card.valid.select(:source_id),
|
|
17
|
+
payment_method: stripe_gateway
|
|
18
|
+
).first&.gateway_payment_profile_id
|
|
16
19
|
|
|
17
20
|
@payment_intent = SpreeStripe::CreatePaymentIntent.new.call(
|
|
18
21
|
spree_current_order,
|
data/lib/spree_stripe/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_stripe
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vendo Connect Inc., Vendo Sp. z o.o.
|
|
@@ -288,9 +288,9 @@ licenses:
|
|
|
288
288
|
- MIT
|
|
289
289
|
metadata:
|
|
290
290
|
bug_tracker_uri: https://github.com/spree/spree_stripe/issues
|
|
291
|
-
changelog_uri: https://github.com/spree/spree_stripe/releases/tag/v1.7.
|
|
291
|
+
changelog_uri: https://github.com/spree/spree_stripe/releases/tag/v1.7.1
|
|
292
292
|
documentation_uri: https://docs.spreecommerce.org/
|
|
293
|
-
source_code_uri: https://github.com/spree/spree_stripe/tree/v1.7.
|
|
293
|
+
source_code_uri: https://github.com/spree/spree_stripe/tree/v1.7.1
|
|
294
294
|
rdoc_options: []
|
|
295
295
|
require_paths:
|
|
296
296
|
- lib
|