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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e37d17d73e754ef2f8526777041be558487592f42818dbe3a554dc663fb0eb97
|
4
|
+
data.tar.gz: c139162cc9fece31518aad3c5ac849de9c392648ee005693f3aa131ea4a98963
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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({
|
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
|
-
|
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(
|
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({
|
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(
|
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(
|
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]"),
|
data/lib/spree_stripe/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2025-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree
|