@open-mercato/gateway-tpay 0.11.1-develop.8417.1.36c73b01e6 → 0.11.1-develop.8418.1.8ddb502575
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 { defineProcessDiRegistrar, registerProcessActivation } from "@open-mercato/shared/lib/di/process-registrar";
|
|
1
2
|
import { asValue } from "awilix";
|
|
2
3
|
import {
|
|
3
4
|
registerGatewayAdapter,
|
|
@@ -12,29 +13,41 @@ import {
|
|
|
12
13
|
verifyTpayNotification
|
|
13
14
|
} from "./lib/webhook-handler.js";
|
|
14
15
|
import { formatTpayWebhookResponse } from "./lib/webhook-response.js";
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
function registerWithActivation(container, activate) {
|
|
17
|
+
activate(() => {
|
|
18
|
+
registerGatewayAdapter(tpayAdapterV1, { version: "v1" });
|
|
19
|
+
});
|
|
20
|
+
activate(() => {
|
|
21
|
+
registerWebhookHandler("tpay", (input) => verifyTpayNotification(input), {
|
|
22
|
+
readPaymentIdHint: readTpayPaymentIdHint,
|
|
23
|
+
rawBody: "bytes",
|
|
24
|
+
maxBodyBytes: TPAY_WEBHOOK_MAX_BODY_BYTES,
|
|
25
|
+
formatResponse: formatTpayWebhookResponse
|
|
26
|
+
});
|
|
22
27
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
activate(() => {
|
|
29
|
+
registerPaymentGatewayDescriptor({
|
|
30
|
+
providerKey: "tpay",
|
|
31
|
+
label: "Tpay",
|
|
32
|
+
requiresPayerFields: ["email", "name"],
|
|
33
|
+
sessionConfig: {
|
|
34
|
+
fields: [],
|
|
35
|
+
supportedCurrencies: ["PLN"],
|
|
36
|
+
supportedPaymentTypes: [{ value: "pay_by_link", label: "Online transfer / BLIK (Tpay hosted page)" }],
|
|
37
|
+
presentation: "redirect"
|
|
38
|
+
}
|
|
39
|
+
});
|
|
33
40
|
});
|
|
34
41
|
container.register({
|
|
35
42
|
tpayHealthCheck: asValue(tpayHealthCheck)
|
|
36
43
|
});
|
|
37
44
|
}
|
|
45
|
+
function register(container) {
|
|
46
|
+
registerWithActivation(container, (activate) => activate());
|
|
47
|
+
}
|
|
48
|
+
defineProcessDiRegistrar((container) => {
|
|
49
|
+
registerWithActivation(container, (activate) => registerProcessActivation(container, activate));
|
|
50
|
+
}, { legacy: register });
|
|
38
51
|
export {
|
|
39
52
|
register
|
|
40
53
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/modules/gateway_tpay/di.ts"],
|
|
4
|
-
"sourcesContent": ["import { asValue } from 'awilix'\nimport type { AppContainer } from '@open-mercato/shared/lib/di/container'\nimport {\n registerGatewayAdapter,\n registerPaymentGatewayDescriptor,\n registerWebhookHandler,\n} from '@open-mercato/shared/modules/payment_gateways/types'\nimport { tpayAdapterV1 } from './lib/adapters/v1'\nimport { tpayHealthCheck } from './lib/health'\nimport {\n readTpayPaymentIdHint,\n TPAY_WEBHOOK_MAX_BODY_BYTES,\n verifyTpayNotification,\n} from './lib/webhook-handler'\nimport { formatTpayWebhookResponse } from './lib/webhook-response'\n\
|
|
5
|
-
"mappings": "AAAA,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iCAAiC;
|
|
4
|
+
"sourcesContent": ["import { defineProcessDiRegistrar, registerProcessActivation } from '@open-mercato/shared/lib/di/process-registrar'\nimport { asValue } from 'awilix'\nimport type { AppContainer } from '@open-mercato/shared/lib/di/container'\nimport {\n registerGatewayAdapter,\n registerPaymentGatewayDescriptor,\n registerWebhookHandler,\n} from '@open-mercato/shared/modules/payment_gateways/types'\nimport { tpayAdapterV1 } from './lib/adapters/v1'\nimport { tpayHealthCheck } from './lib/health'\nimport {\n readTpayPaymentIdHint,\n TPAY_WEBHOOK_MAX_BODY_BYTES,\n verifyTpayNotification,\n} from './lib/webhook-handler'\nimport { formatTpayWebhookResponse } from './lib/webhook-response'\n\nfunction registerWithActivation(container: AppContainer, activate: (callback: () => void) => void) {\n activate(() => {\n registerGatewayAdapter(tpayAdapterV1, { version: 'v1' })\n })\n activate(() => {\n registerWebhookHandler('tpay', (input) => verifyTpayNotification(input), {\n readPaymentIdHint: readTpayPaymentIdHint,\n rawBody: 'bytes',\n maxBodyBytes: TPAY_WEBHOOK_MAX_BODY_BYTES,\n formatResponse: formatTpayWebhookResponse,\n })\n })\n activate(() => {\n registerPaymentGatewayDescriptor({\n providerKey: 'tpay',\n label: 'Tpay',\n requiresPayerFields: ['email', 'name'],\n sessionConfig: {\n fields: [],\n supportedCurrencies: ['PLN'],\n supportedPaymentTypes: [{ value: 'pay_by_link', label: 'Online transfer / BLIK (Tpay hosted page)' }],\n presentation: 'redirect',\n },\n })\n })\n\n container.register({\n tpayHealthCheck: asValue(tpayHealthCheck),\n })\n}\n\nexport function register(container: AppContainer): void {\n registerWithActivation(container, (activate) => activate())\n}\n\ndefineProcessDiRegistrar((container: AppContainer) => {\n registerWithActivation(container, (activate) => registerProcessActivation(container, activate))\n}, { legacy: register })\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,0BAA0B,iCAAiC;AACpE,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iCAAiC;AAE1C,SAAS,uBAAuB,WAAyB,UAA0C;AACjG,WAAS,MAAM;AACb,2BAAuB,eAAe,EAAE,SAAS,KAAK,CAAC;AAAA,EACzD,CAAC;AACD,WAAS,MAAM;AACb,2BAAuB,QAAQ,CAAC,UAAU,uBAAuB,KAAK,GAAG;AAAA,MACvE,mBAAmB;AAAA,MACnB,SAAS;AAAA,MACT,cAAc;AAAA,MACd,gBAAgB;AAAA,IAClB,CAAC;AAAA,EACH,CAAC;AACD,WAAS,MAAM;AACb,qCAAiC;AAAA,MAC/B,aAAa;AAAA,MACb,OAAO;AAAA,MACP,qBAAqB,CAAC,SAAS,MAAM;AAAA,MACrC,eAAe;AAAA,QACb,QAAQ,CAAC;AAAA,QACT,qBAAqB,CAAC,KAAK;AAAA,QAC3B,uBAAuB,CAAC,EAAE,OAAO,eAAe,OAAO,4CAA4C,CAAC;AAAA,QACpG,cAAc;AAAA,MAChB;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AAED,YAAU,SAAS;AAAA,IACjB,iBAAiB,QAAQ,eAAe;AAAA,EAC1C,CAAC;AACH;AAEO,SAAS,SAAS,WAA+B;AACtD,yBAAuB,WAAW,CAAC,aAAa,SAAS,CAAC;AAC5D;AAEA,yBAAyB,CAAC,cAA4B;AACpD,yBAAuB,WAAW,CAAC,aAAa,0BAA0B,WAAW,QAAQ,CAAC;AAChG,GAAG,EAAE,QAAQ,SAAS,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/gateway-tpay",
|
|
3
|
-
"version": "0.11.1-develop.
|
|
3
|
+
"version": "0.11.1-develop.8418.1.8ddb502575",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -62,21 +62,21 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@open-mercato/core": "0.11.1-develop.
|
|
65
|
+
"@open-mercato/core": "0.11.1-develop.8418.1.8ddb502575",
|
|
66
66
|
"zod": "^4.6.6"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@mikro-orm/postgresql": "^7.0.14",
|
|
70
|
-
"@open-mercato/ai-assistant": "0.11.1-develop.
|
|
71
|
-
"@open-mercato/shared": "0.11.1-develop.
|
|
72
|
-
"@open-mercato/ui": "0.11.1-develop.
|
|
70
|
+
"@open-mercato/ai-assistant": "0.11.1-develop.8418.1.8ddb502575",
|
|
71
|
+
"@open-mercato/shared": "0.11.1-develop.8418.1.8ddb502575",
|
|
72
|
+
"@open-mercato/ui": "0.11.1-develop.8418.1.8ddb502575",
|
|
73
73
|
"react": "^19.0.0",
|
|
74
74
|
"react-dom": "^19.0.0"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@open-mercato/ai-assistant": "0.11.1-develop.
|
|
78
|
-
"@open-mercato/shared": "0.11.1-develop.
|
|
79
|
-
"@open-mercato/ui": "0.11.1-develop.
|
|
77
|
+
"@open-mercato/ai-assistant": "0.11.1-develop.8418.1.8ddb502575",
|
|
78
|
+
"@open-mercato/shared": "0.11.1-develop.8418.1.8ddb502575",
|
|
79
|
+
"@open-mercato/ui": "0.11.1-develop.8418.1.8ddb502575",
|
|
80
80
|
"@types/jest": "^30.0.0",
|
|
81
81
|
"esbuild": "^0.28.2",
|
|
82
82
|
"glob": "^14.0.6",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defineProcessDiRegistrar, registerProcessActivation } from '@open-mercato/shared/lib/di/process-registrar'
|
|
1
2
|
import { asValue } from 'awilix'
|
|
2
3
|
import type { AppContainer } from '@open-mercato/shared/lib/di/container'
|
|
3
4
|
import {
|
|
@@ -14,27 +15,41 @@ import {
|
|
|
14
15
|
} from './lib/webhook-handler'
|
|
15
16
|
import { formatTpayWebhookResponse } from './lib/webhook-response'
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
readPaymentIdHint: readTpayPaymentIdHint,
|
|
21
|
-
rawBody: 'bytes',
|
|
22
|
-
maxBodyBytes: TPAY_WEBHOOK_MAX_BODY_BYTES,
|
|
23
|
-
formatResponse: formatTpayWebhookResponse,
|
|
18
|
+
function registerWithActivation(container: AppContainer, activate: (callback: () => void) => void) {
|
|
19
|
+
activate(() => {
|
|
20
|
+
registerGatewayAdapter(tpayAdapterV1, { version: 'v1' })
|
|
24
21
|
})
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
activate(() => {
|
|
23
|
+
registerWebhookHandler('tpay', (input) => verifyTpayNotification(input), {
|
|
24
|
+
readPaymentIdHint: readTpayPaymentIdHint,
|
|
25
|
+
rawBody: 'bytes',
|
|
26
|
+
maxBodyBytes: TPAY_WEBHOOK_MAX_BODY_BYTES,
|
|
27
|
+
formatResponse: formatTpayWebhookResponse,
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
activate(() => {
|
|
31
|
+
registerPaymentGatewayDescriptor({
|
|
32
|
+
providerKey: 'tpay',
|
|
33
|
+
label: 'Tpay',
|
|
34
|
+
requiresPayerFields: ['email', 'name'],
|
|
35
|
+
sessionConfig: {
|
|
36
|
+
fields: [],
|
|
37
|
+
supportedCurrencies: ['PLN'],
|
|
38
|
+
supportedPaymentTypes: [{ value: 'pay_by_link', label: 'Online transfer / BLIK (Tpay hosted page)' }],
|
|
39
|
+
presentation: 'redirect',
|
|
40
|
+
},
|
|
41
|
+
})
|
|
35
42
|
})
|
|
36
43
|
|
|
37
44
|
container.register({
|
|
38
45
|
tpayHealthCheck: asValue(tpayHealthCheck),
|
|
39
46
|
})
|
|
40
47
|
}
|
|
48
|
+
|
|
49
|
+
export function register(container: AppContainer): void {
|
|
50
|
+
registerWithActivation(container, (activate) => activate())
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
defineProcessDiRegistrar((container: AppContainer) => {
|
|
54
|
+
registerWithActivation(container, (activate) => registerProcessActivation(container, activate))
|
|
55
|
+
}, { legacy: register })
|