spree_stripe 1.2.0 → 1.2.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: c4801c18bf35871023246017da04ccd49ebbec76ad69f6e0cea580adea90ab7c
4
- data.tar.gz: 1266361dffc5a3f5798e38e18a81bd2dd441b490603fbf553ada79793a8a4c56
3
+ metadata.gz: a540c933bff10c811a20b24b6a5505e88909ca2ab850f79d8a9379bfba38cf8d
4
+ data.tar.gz: 9200f901dc465383b6b514e8296181be8c99d435159bba8a3f87af170c17e897
5
5
  SHA512:
6
- metadata.gz: 6a96049fc532a0fbf44da47a10ce636e39017462bc0f4eb507591a392d1381f8a60fe9435ba77701d9435e556c886dbaaa61d542a982414ef7ed5f97e60a689c
7
- data.tar.gz: 4e7fd4f6fa67cb2993be14c1aee2fa6a46f111382cfea02a0b510df94c80b76e53fd1d732dc2ada39bd4eb5df0e27eaca1fd9c3c06d0d46b075c703e16e61b3f
6
+ metadata.gz: 94184ca73d24e1d467f595ed674ccc7f03e888ce64021d72d1bb2c22454fe010bb0ac8f57451d2e43e7d1ecca956d73398c9e14d3a77b0638203eb5ef34005b6
7
+ data.tar.gz: 0357bcb45f3ff71cdb950cae6180a19a08f658b7084c15bb92c777a477d7b0fe1e264b8c259729b7d48dc3109c3c26695e92aa2b137c5636288e2573a5cee9fa
@@ -10,7 +10,8 @@ export default class extends Controller {
10
10
  orderToken: String,
11
11
  colorPrimary: String,
12
12
  colorBackground: String,
13
- colorText: String
13
+ colorText: String,
14
+ storeUrl: String
14
15
  }
15
16
 
16
17
  static targets = [
@@ -52,7 +53,7 @@ export default class extends Controller {
52
53
  }
53
54
 
54
55
  const response = await fetch(
55
- `/api/v2/storefront/stripe/payment_intents/${this.paymentIntentValue.id}`,
56
+ `${this.storeUrlValue}/api/v2/storefront/stripe/payment_intents/${this.paymentIntentValue.id}`,
56
57
  {
57
58
  method: 'PATCH',
58
59
  headers: this.spreeApiHeaders,
@@ -178,7 +179,7 @@ export default class extends Controller {
178
179
 
179
180
  async validateOrderForPayment() {
180
181
  const response = await fetch(
181
- '/api/v2/storefront/checkout/validate_order_for_payment',
182
+ `${this.storeUrlValue}/api/v2/storefront/checkout/validate_order_for_payment`,
182
183
  {
183
184
  method: 'POST',
184
185
  headers: this.spreeApiHeaders
@@ -203,7 +204,7 @@ export default class extends Controller {
203
204
  async updateBillingAddress() {
204
205
  // billing address same as shipping address
205
206
  if (this.billingAddressCheckbox.checked) {
206
- const response = await fetch('/api/v2/storefront/checkout?include=billing_address', {
207
+ const response = await fetch(`${this.storeUrlValue}/api/v2/storefront/checkout?include=billing_address`, {
207
208
  method: 'PATCH',
208
209
  headers: this.spreeApiHeaders,
209
210
  body: JSON.stringify({
@@ -227,7 +228,7 @@ export default class extends Controller {
227
228
  if (this.billingAddressForm.checkValidity()) {
228
229
  const formData = new FormData(this.billingAddressForm);
229
230
 
230
- const response = await fetch('/api/v2/storefront/checkout?include=billing_address', {
231
+ const response = await fetch(`${this.storeUrlValue}/api/v2/storefront/checkout?include=billing_address`, {
231
232
  method: 'PATCH',
232
233
  headers: this.spreeApiHeaders,
233
234
  body: JSON.stringify({
@@ -7,6 +7,7 @@
7
7
  data-checkout-stripe-order-email-value="<%= @order.email %>"
8
8
  data-checkout-stripe-color-primary-value="<%= hex_color_to_rgb(theme_setting(:primary_color)) %>"
9
9
  data-checkout-stripe-color-text-value="<%= hex_color_to_rgb(theme_setting(:text_color)) %>"
10
+ data-checkout-stripe-store-url-value="<%= current_store.formatted_url_or_custom_domain %>"
10
11
  >
11
12
  <% payment_sources = checkout_payment_sources(payment_method) %>
12
13
 
@@ -1,5 +1,5 @@
1
1
  module SpreeStripe
2
- VERSION = '1.2.0'.freeze
2
+ VERSION = '1.2.1'.freeze
3
3
 
4
4
  def gem_version
5
5
  Gem::Version.new(VERSION)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vendo Connect Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-10 00:00:00.000000000 Z
11
+ date: 2025-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree