spree_stripe 1.2.4 → 1.2.5

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: 1fc16c4c66625cd297cb6b34950212f80282a391bcfd8504f5bdca3fb965e3b6
4
- data.tar.gz: c375e87b7aa96d0ff378b181b0db2585cfb16a8c207e859c1d7d266cf8de3116
3
+ metadata.gz: e37d17d73e754ef2f8526777041be558487592f42818dbe3a554dc663fb0eb97
4
+ data.tar.gz: c139162cc9fece31518aad3c5ac849de9c392648ee005693f3aa131ea4a98963
5
5
  SHA512:
6
- metadata.gz: f75ae1f8dafbf9be2c134b8689fdeddc9dd1a05e66b77b1cb315fb40627493c91ee035aa30555e6f8d1f8c48b24bf05a3338b0c9eba5e31ceeeead9b803518d1
7
- data.tar.gz: 5577ee9f5e556bca74158eefe15091778a67099d7a9b44936fd778a11fcfaf62a3b268dfd30394790ffe825fa38361feab4b9c761e09156e228fc7d3512c9fcf
6
+ metadata.gz: 857e2aecfe5e8860da213246d1098819eca5ab56060c4d91bebe1ac49af3b6207a279d1f86239f263488d8c878ef94a76dafa1a3b4cab0a8279e30b8bb2b49c8
7
+ data.tar.gz: d2770b0f50b05d0e8f91b52fbc79c321108464c791ca356248d5361913f54c160fb6cf4ea08170c3055a56d2843c2abcabf3ddcac22916e5426a3b10761c5867
@@ -160,14 +160,19 @@ export default class extends Controller {
160
160
  // In case of any error here we have to allow user try again
161
161
  try {
162
162
  const response = await fetch(
163
- `${this.checkoutAdvancePathValue}?state=delivery&include=shipments.shipping_rates,line_items.vendor`,
163
+ this.checkoutAdvancePathValue,
164
164
  {
165
165
  method: 'PATCH',
166
166
  headers: {
167
167
  'X-Spree-Order-Token': this.orderTokenValue,
168
168
  'Content-Type': 'application/json'
169
169
  },
170
- body: JSON.stringify({ quick_checkout: true, shipping_method_id: this.currentShippingOptionId })
170
+ body: JSON.stringify({
171
+ state: 'delivery',
172
+ include: 'shipments.shipping_rates',
173
+ quick_checkout: true,
174
+ shipping_method_id: this.currentShippingOptionId
175
+ })
171
176
  }
172
177
  )
173
178
  const newOrderResponse = await response.json()
@@ -259,13 +264,14 @@ export default class extends Controller {
259
264
  }
260
265
 
261
266
  const validationResponse = await fetch(
262
- `${this.checkoutValidateOrderForPaymentPathValue}?skip_state=true`,
267
+ this.checkoutValidateOrderForPaymentPathValue,
263
268
  {
264
269
  method: 'POST',
265
270
  headers: {
266
271
  'X-Spree-Order-Token': this.orderTokenValue,
267
272
  'Content-Type': 'application/json'
268
- }
273
+ },
274
+ body: JSON.stringify({ skip_state: true })
269
275
  }
270
276
  )
271
277
 
@@ -307,13 +313,16 @@ export default class extends Controller {
307
313
  return
308
314
  }
309
315
 
310
- const advanceResponse = await fetch(`${this.checkoutAdvancePathValue}?state=payment`, {
316
+ const advanceResponse = await fetch(this.checkoutAdvancePathValue, {
311
317
  method: 'PATCH',
312
318
  headers: {
313
319
  'X-Spree-Order-Token': this.orderTokenValue,
314
320
  'Content-Type': 'application/json'
315
321
  },
316
- body: JSON.stringify({ shipping_method_id: shippingRateId })
322
+ body: JSON.stringify({
323
+ state: 'payment',
324
+ shipping_method_id: shippingRateId
325
+ })
317
326
  })
318
327
 
319
328
  if (advanceResponse.status !== 200) {
@@ -206,10 +206,11 @@ export default class extends Controller {
206
206
  async updateBillingAddress() {
207
207
  // billing address same as shipping address
208
208
  if (this.billingAddressCheckbox?.checked) {
209
- const response = await fetch(`${this.checkoutPathValue}?include=billing_address`, {
209
+ const response = await fetch(this.checkoutPathValue, {
210
210
  method: 'PATCH',
211
211
  headers: this.spreeApiHeaders,
212
212
  body: JSON.stringify({
213
+ include: 'billing_address',
213
214
  order: {
214
215
  use_shipping: true
215
216
  }
@@ -230,10 +231,11 @@ export default class extends Controller {
230
231
  if (this.billingAddressForm.checkValidity()) {
231
232
  const formData = new FormData(this.billingAddressForm);
232
233
 
233
- const response = await fetch(`${this.checkoutPathValue}?include=billing_address`, {
234
+ const response = await fetch(this.checkoutPathValue, {
234
235
  method: 'PATCH',
235
236
  headers: this.spreeApiHeaders,
236
237
  body: JSON.stringify({
238
+ include: 'billing_address',
237
239
  order: {
238
240
  bill_address_attributes: {
239
241
  firstname: formData.get("order[bill_address_attributes][firstname]"),
@@ -1,5 +1,5 @@
1
1
  module SpreeStripe
2
- VERSION = '1.2.4'.freeze
2
+ VERSION = '1.2.5'.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.4
4
+ version: 1.2.5
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-07-02 00:00:00.000000000 Z
11
+ date: 2025-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree