@unchainedshop/plugins 2.10.5 → 2.10.7
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { slugify } from '@unchainedshop/utils';
|
|
1
2
|
import Stripe from 'stripe';
|
|
2
3
|
const { STRIPE_SECRET, STRIPE_WEBHOOK_ENVIRONMENT, EMAIL_WEBSITE_NAME } = process.env;
|
|
3
4
|
const stripe = new Stripe(STRIPE_SECRET, {
|
|
@@ -31,9 +32,8 @@ export const createOrderPaymentIntent = async ({ order, orderPayment, pricing },
|
|
|
31
32
|
const paymentIntent = await stripe.paymentIntents.create({
|
|
32
33
|
amount: Math.round(amount),
|
|
33
34
|
currency: currency.toLowerCase(),
|
|
34
|
-
description: `${reference}
|
|
35
|
-
|
|
36
|
-
statement_descriptor_suffix: reference,
|
|
35
|
+
description: `${reference}`,
|
|
36
|
+
statement_descriptor_suffix: slugify(reference),
|
|
37
37
|
receipt_email: order.contact?.emailAddress,
|
|
38
38
|
setup_future_usage: 'off_session', // Verify your integration in this guide by including this parameter
|
|
39
39
|
metadata: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.js","sourceRoot":"","sources":["../../../src/payment/stripe/stripe.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,EAAE,aAAa,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAEtF,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,EAAE;IACvC,UAAU,EAAE,YAAY;CACzB,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC;AAEtB,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAC3C,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC1C,OAAO,GAAG,EAAE,EACZ,EAAE;IACF,MAAM,QA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AAS,EAAE;QAC3B,2BAA2B,EAAE,OAAO,CAAC,SAAS,CAAC;QAC/C,aAAa,EAAE,KAAK,CAAC,OAAO,EAAE,YAAY;QAC1C,kBAAkB,EAAE,aAAa,EAAE,oEAAoE;QACvG,QAAQ,EAAE;YACR,cAAc,EAAE,YAAY,CAAC,GAAG;YAChC,WAAW,EAAE,0BAA0B,IAAI,IAAI;SAChD;QACD,GAAG,OAAO;KACX,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/plugins",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.7",
|
|
4
4
|
"main": "lib/plugins-index.js",
|
|
5
5
|
"types": "lib/plugins-index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"type": "module",
|
|
52
52
|
"scripts": {
|
|
53
53
|
"clean": "rm -rf lib",
|
|
54
|
-
"
|
|
54
|
+
"prepublishOnly": "npm run clean && tsc",
|
|
55
55
|
"watch": "tsc -w",
|
|
56
56
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles --forceExit",
|
|
57
57
|
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --detectOpenHandles --forceExit"
|
|
@@ -75,48 +75,48 @@
|
|
|
75
75
|
"@redis/client": "^1.5.8",
|
|
76
76
|
"bip32": "^4.0.0",
|
|
77
77
|
"escape-string-regexp": "^5.0.0",
|
|
78
|
-
"ethers": "^6.13.
|
|
78
|
+
"ethers": "^6.13.1",
|
|
79
79
|
"express": "^4.x",
|
|
80
80
|
"lru-cache": "^10.0.0",
|
|
81
81
|
"open": "^10.0.0",
|
|
82
82
|
"postfinancecheckout": "^4.1.1",
|
|
83
|
-
"stripe": "^15.
|
|
83
|
+
"stripe": "^15.12.0",
|
|
84
84
|
"tiny-secp256k1": "^2.2.3",
|
|
85
|
-
"twilio": "^5.
|
|
85
|
+
"twilio": "^5.2.0",
|
|
86
86
|
"web-push": "^3.6.3"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@redis/client": "^1.5.16",
|
|
90
|
-
"@types/node": "^20.14.
|
|
91
|
-
"@unchainedshop/api": "^2.10.
|
|
92
|
-
"@unchainedshop/core-delivery": "^2.10.
|
|
93
|
-
"@unchainedshop/core-enrollments": "^2.10.
|
|
94
|
-
"@unchainedshop/core-filters": "^2.10.
|
|
95
|
-
"@unchainedshop/core-messaging": "^2.10.
|
|
96
|
-
"@unchainedshop/core-orders": "^2.10.
|
|
97
|
-
"@unchainedshop/core-payment": "^2.10.
|
|
98
|
-
"@unchainedshop/core-products": "^2.10.
|
|
99
|
-
"@unchainedshop/core-quotations": "^2.10.
|
|
100
|
-
"@unchainedshop/core-warehousing": "^2.10.
|
|
101
|
-
"@unchainedshop/core-worker": "^2.10.
|
|
102
|
-
"@unchainedshop/events": "^2.10.
|
|
103
|
-
"@unchainedshop/file-upload": "^2.10.
|
|
104
|
-
"@unchainedshop/logger": "^2.10.
|
|
105
|
-
"@unchainedshop/types": "^2.10.
|
|
106
|
-
"@unchainedshop/utils": "^2.10.
|
|
90
|
+
"@types/node": "^20.14.7",
|
|
91
|
+
"@unchainedshop/api": "^2.10.7",
|
|
92
|
+
"@unchainedshop/core-delivery": "^2.10.7",
|
|
93
|
+
"@unchainedshop/core-enrollments": "^2.10.7",
|
|
94
|
+
"@unchainedshop/core-filters": "^2.10.7",
|
|
95
|
+
"@unchainedshop/core-messaging": "^2.10.7",
|
|
96
|
+
"@unchainedshop/core-orders": "^2.10.7",
|
|
97
|
+
"@unchainedshop/core-payment": "^2.10.7",
|
|
98
|
+
"@unchainedshop/core-products": "^2.10.7",
|
|
99
|
+
"@unchainedshop/core-quotations": "^2.10.7",
|
|
100
|
+
"@unchainedshop/core-warehousing": "^2.10.7",
|
|
101
|
+
"@unchainedshop/core-worker": "^2.10.7",
|
|
102
|
+
"@unchainedshop/events": "^2.10.7",
|
|
103
|
+
"@unchainedshop/file-upload": "^2.10.7",
|
|
104
|
+
"@unchainedshop/logger": "^2.10.7",
|
|
105
|
+
"@unchainedshop/types": "^2.10.7",
|
|
106
|
+
"@unchainedshop/utils": "^2.10.7",
|
|
107
107
|
"bluebird": "^3.7.2",
|
|
108
108
|
"event-iterator": "^2.0.0",
|
|
109
109
|
"express": "^4.19.2",
|
|
110
110
|
"jest": "^29.7.0",
|
|
111
111
|
"JSONStream": "^1.3.5",
|
|
112
112
|
"lru-cache": "^10.2.2",
|
|
113
|
-
"minio": "^8.0.
|
|
113
|
+
"minio": "^8.0.1",
|
|
114
114
|
"node-sheets": "^1.2.0",
|
|
115
|
-
"nodemailer": "^6.9.
|
|
115
|
+
"nodemailer": "^6.9.14",
|
|
116
116
|
"open": "^10.1.0",
|
|
117
117
|
"postfinancecheckout": "^4.5.0",
|
|
118
118
|
"request": "^2.88.2",
|
|
119
|
-
"ts-jest": "^29.1.
|
|
119
|
+
"ts-jest": "^29.1.5",
|
|
120
120
|
"typescript": "^5.4.5",
|
|
121
121
|
"web-push": "^3.6.7",
|
|
122
122
|
"xml-js": "^1.6.11"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { slugify } from '@unchainedshop/utils';
|
|
1
2
|
import Stripe from 'stripe';
|
|
2
3
|
|
|
3
4
|
const { STRIPE_SECRET, STRIPE_WEBHOOK_ENVIRONMENT, EMAIL_WEBSITE_NAME } = process.env;
|
|
@@ -39,9 +40,8 @@ export const createOrderPaymentIntent = async ({ order, orderPayment, pricing },
|
|
|
39
40
|
const paymentIntent = await stripe.paymentIntents.create({
|
|
40
41
|
amount: Math.round(amount),
|
|
41
42
|
currency: currency.toLowerCase(),
|
|
42
|
-
description: `${reference}
|
|
43
|
-
|
|
44
|
-
statement_descriptor_suffix: reference,
|
|
43
|
+
description: `${reference}`,
|
|
44
|
+
statement_descriptor_suffix: slugify(reference),
|
|
45
45
|
receipt_email: order.contact?.emailAddress,
|
|
46
46
|
setup_future_usage: 'off_session', // Verify your integration in this guide by including this parameter
|
|
47
47
|
metadata: {
|