swell-js 3.20.1 → 3.20.2
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.
- package/dist/{api-06903a1c.js → api-3759aa14.js} +2 -2
- package/dist/api.js +2 -2
- package/dist/{index-1582746d.js → index-47c8a8e3.js} +9 -5
- package/dist/index.js +2 -2
- package/dist/payment.js +1 -1
- package/dist/swell.cjs.js +10 -6
- package/dist/swell.cjs.js.map +1 -1
- package/dist/swell.umd.min.js +6 -5
- package/dist/swell.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import { m as methods$6 } from './subscriptions-8044a530.js';
|
|
|
10
10
|
import { d as defaultMethods, n as trimEnd, K as utils, l as trimStart, k as trimBoth, j as toSnake, o as stringifyQuery, E as base64Encode, t as toCamel, e as setOptions } from './index-512fc30d.js';
|
|
11
11
|
import { m as methods$7 } from './content-0afdcb05.js';
|
|
12
12
|
import { m as methods$8 } from './settings-937b96f1.js';
|
|
13
|
-
import { P as PaymentController } from './index-
|
|
13
|
+
import { P as PaymentController } from './index-47c8a8e3.js';
|
|
14
14
|
import { m as methods$9 } from './locale-4391bcf3.js';
|
|
15
15
|
import { m as methods$a } from './currency-842f76f2.js';
|
|
16
16
|
|
|
@@ -34,7 +34,7 @@ const options = {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
const api = {
|
|
37
|
-
version: '3.20.
|
|
37
|
+
version: '3.20.2',
|
|
38
38
|
options,
|
|
39
39
|
request,
|
|
40
40
|
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as default } from './api-
|
|
1
|
+
export { a as default } from './api-3759aa14.js';
|
|
2
2
|
import './card-91071403.js';
|
|
3
3
|
import './index-512fc30d.js';
|
|
4
4
|
import 'qs';
|
|
@@ -14,6 +14,6 @@ import './categories-8f6a4584.js';
|
|
|
14
14
|
import './subscriptions-8044a530.js';
|
|
15
15
|
import './content-0afdcb05.js';
|
|
16
16
|
import './settings-937b96f1.js';
|
|
17
|
-
import './index-
|
|
17
|
+
import './index-47c8a8e3.js';
|
|
18
18
|
import './locale-4391bcf3.js';
|
|
19
19
|
import './currency-842f76f2.js';
|
|
@@ -174,6 +174,14 @@ class Payment {
|
|
|
174
174
|
throw new Error('Cart not found');
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
if (!cart.settings) {
|
|
178
|
+
const settings = await this.getSettings();
|
|
179
|
+
|
|
180
|
+
cart.settings = {
|
|
181
|
+
...settings.store,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
177
185
|
return toSnake(cart);
|
|
178
186
|
}
|
|
179
187
|
|
|
@@ -988,13 +996,9 @@ class StripeKlarnaPayment extends Payment {
|
|
|
988
996
|
|
|
989
997
|
async tokenize() {
|
|
990
998
|
const cart = await this.getCart();
|
|
991
|
-
const settings = await this.getSettings();
|
|
992
999
|
const { source, error: sourceError } = await createKlarnaSource(
|
|
993
1000
|
this.stripe,
|
|
994
|
-
|
|
995
|
-
...cart,
|
|
996
|
-
settings: settings.store,
|
|
997
|
-
},
|
|
1001
|
+
cart,
|
|
998
1002
|
);
|
|
999
1003
|
|
|
1000
1004
|
if (sourceError) {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as default } from './api-
|
|
1
|
+
export { a as default } from './api-3759aa14.js';
|
|
2
2
|
import './card-91071403.js';
|
|
3
3
|
import './index-512fc30d.js';
|
|
4
4
|
import 'qs';
|
|
@@ -14,6 +14,6 @@ import './categories-8f6a4584.js';
|
|
|
14
14
|
import './subscriptions-8044a530.js';
|
|
15
15
|
import './content-0afdcb05.js';
|
|
16
16
|
import './settings-937b96f1.js';
|
|
17
|
-
import './index-
|
|
17
|
+
import './index-47c8a8e3.js';
|
|
18
18
|
import './locale-4391bcf3.js';
|
|
19
19
|
import './currency-842f76f2.js';
|
package/dist/payment.js
CHANGED
package/dist/swell.cjs.js
CHANGED
|
@@ -6338,6 +6338,14 @@ class Payment {
|
|
|
6338
6338
|
throw new Error('Cart not found');
|
|
6339
6339
|
}
|
|
6340
6340
|
|
|
6341
|
+
if (!cart.settings) {
|
|
6342
|
+
const settings = await this.getSettings();
|
|
6343
|
+
|
|
6344
|
+
cart.settings = {
|
|
6345
|
+
...settings.store,
|
|
6346
|
+
};
|
|
6347
|
+
}
|
|
6348
|
+
|
|
6341
6349
|
return toSnake(cart);
|
|
6342
6350
|
}
|
|
6343
6351
|
|
|
@@ -7152,13 +7160,9 @@ class StripeKlarnaPayment extends Payment {
|
|
|
7152
7160
|
|
|
7153
7161
|
async tokenize() {
|
|
7154
7162
|
const cart = await this.getCart();
|
|
7155
|
-
const settings = await this.getSettings();
|
|
7156
7163
|
const { source, error: sourceError } = await createKlarnaSource(
|
|
7157
7164
|
this.stripe,
|
|
7158
|
-
|
|
7159
|
-
...cart,
|
|
7160
|
-
settings: settings.store,
|
|
7161
|
-
},
|
|
7165
|
+
cart,
|
|
7162
7166
|
);
|
|
7163
7167
|
|
|
7164
7168
|
if (sourceError) {
|
|
@@ -9177,7 +9181,7 @@ const options = {
|
|
|
9177
9181
|
};
|
|
9178
9182
|
|
|
9179
9183
|
const api = {
|
|
9180
|
-
version: '3.20.
|
|
9184
|
+
version: '3.20.2',
|
|
9181
9185
|
options,
|
|
9182
9186
|
request: request$1,
|
|
9183
9187
|
|