@orboni/vendure-plugin 0.0.0-stage → 1.0.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.
- package/CHANGELOG.md +14 -0
- package/LICENSE +21 -0
- package/README.md +83 -2
- package/dist/constants.d.ts +10 -0
- package/dist/constants.js +9 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +17 -0
- package/dist/money.d.ts +15 -0
- package/dist/money.js +38 -0
- package/dist/orboni.controller.d.ts +10 -0
- package/dist/orboni.controller.js +43 -0
- package/dist/orboni.handler.d.ts +61 -0
- package/dist/orboni.handler.js +56 -0
- package/dist/orboni.plugin.d.ts +18 -0
- package/dist/orboni.plugin.js +147 -0
- package/dist/orboni.resolver.d.ts +7 -0
- package/dist/orboni.resolver.js +42 -0
- package/dist/orboni.service.d.ts +120 -0
- package/dist/orboni.service.js +658 -0
- package/dist/status.d.ts +22 -0
- package/dist/status.js +31 -0
- package/package.json +56 -5
package/dist/status.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paymentState = paymentState;
|
|
4
|
+
exports.notPaidReason = notPaidReason;
|
|
5
|
+
/**
|
|
6
|
+
* - paid: `Settled` — the order is paid;
|
|
7
|
+
* - on its way, or held for review: `Authorized` — the order is placed and
|
|
8
|
+
* waits for its payment, which is settled once Orboni says it is paid;
|
|
9
|
+
* - anything else: nothing to record yet (`null`).
|
|
10
|
+
*/
|
|
11
|
+
function paymentState(session) {
|
|
12
|
+
if (session.status === 'complete' && session.payment_status === 'paid') {
|
|
13
|
+
return 'Settled';
|
|
14
|
+
}
|
|
15
|
+
if (session.payment_status === 'processing' || session.payment_status === 'held') {
|
|
16
|
+
return 'Authorized';
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
/** What the buyer is told when a session has nothing to record yet. */
|
|
21
|
+
function notPaidReason(session) {
|
|
22
|
+
if (session.payment_status === 'partially_paid') {
|
|
23
|
+
return session.status === 'open'
|
|
24
|
+
? 'Only part of the payment has arrived: the payment page shows what is still to send.'
|
|
25
|
+
: 'Only part of the payment arrived before the payment page closed. The store will be in touch about it.';
|
|
26
|
+
}
|
|
27
|
+
if (session.status === 'expired') {
|
|
28
|
+
return 'The payment page closed before it was paid. Open it again to pay.';
|
|
29
|
+
}
|
|
30
|
+
return 'The order is not paid yet. Pay on the payment page, or choose another way to pay.';
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,57 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@orboni/vendure-plugin",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Crypto payments for Vendure: USDT, USDC, Bitcoin and more, paid straight to your own wallets through Orboni's payment page.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vendure",
|
|
7
|
+
"vendure-plugin",
|
|
8
|
+
"vendure-payment",
|
|
9
|
+
"orboni",
|
|
10
|
+
"crypto",
|
|
11
|
+
"payments",
|
|
12
|
+
"usdt",
|
|
13
|
+
"usdc",
|
|
14
|
+
"bitcoin",
|
|
15
|
+
"payment-gateway"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://orboni.com/docs/vendure",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/orboni/vendure-plugin-orboni.git"
|
|
21
|
+
},
|
|
22
|
+
"bugs": "https://github.com/orboni/vendure-plugin-orboni/issues",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"author": "Orboni <support@orboni.com>",
|
|
25
|
+
"main": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md",
|
|
30
|
+
"CHANGELOG.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=20"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
38
|
+
"test": "npm run build && node --test test/*.test.js",
|
|
39
|
+
"prepublishOnly": "npm test"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"body-parser": "^2.2.0",
|
|
43
|
+
"graphql-tag": "^2.12.6",
|
|
44
|
+
"orboni": "^1.0.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@nestjs/common": "*",
|
|
48
|
+
"@nestjs/graphql": "*",
|
|
49
|
+
"@vendure/core": "^3.0.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/body-parser": "^1.19.5",
|
|
53
|
+
"@types/node": "^22.0.0",
|
|
54
|
+
"@vendure/core": "3.8.2",
|
|
55
|
+
"typescript": "^5.6.0"
|
|
56
|
+
}
|
|
57
|
+
}
|