@open-mercato/gateway-autopay 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,
|
|
@@ -5,30 +6,40 @@ import {
|
|
|
5
6
|
} from "@open-mercato/shared/modules/payment_gateways/types";
|
|
6
7
|
import { autopayHealthCheck } from "./lib/health.js";
|
|
7
8
|
import { autopayAdapterV1 } from "./lib/adapters/v1.js";
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
function registerWithActivation(container, activate) {
|
|
10
|
+
activate(() => {
|
|
11
|
+
registerGatewayAdapter(autopayAdapterV1, { version: "v1" });
|
|
12
|
+
});
|
|
13
|
+
activate(() => {
|
|
14
|
+
registerPaymentGatewayDescriptor({
|
|
15
|
+
providerKey: "autopay",
|
|
16
|
+
label: "Autopay",
|
|
17
|
+
requiresPayerFields: ["email"],
|
|
18
|
+
sessionConfig: {
|
|
19
|
+
supportedCurrencies: ["PLN"],
|
|
20
|
+
defaultRendererKey: "autopay.hosted_redirect",
|
|
21
|
+
renderers: [
|
|
22
|
+
{
|
|
23
|
+
key: "autopay.hosted_redirect",
|
|
24
|
+
label: "Autopay Hosted Redirect",
|
|
25
|
+
type: "redirect",
|
|
26
|
+
description: "Redirects the payer to Autopay's hosted payment page (bank transfer, BLIK, cards).",
|
|
27
|
+
supportedPaymentTypes: "*"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
});
|
|
27
32
|
});
|
|
28
33
|
container.register({
|
|
29
34
|
autopayHealthCheck: asValue(autopayHealthCheck)
|
|
30
35
|
});
|
|
31
36
|
}
|
|
37
|
+
function register(container) {
|
|
38
|
+
registerWithActivation(container, (activate) => activate());
|
|
39
|
+
}
|
|
40
|
+
defineProcessDiRegistrar((container) => {
|
|
41
|
+
registerWithActivation(container, (activate) => registerProcessActivation(container, activate));
|
|
42
|
+
}, { legacy: register });
|
|
32
43
|
export {
|
|
33
44
|
register
|
|
34
45
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/modules/gateway_autopay/di.ts"],
|
|
4
|
-
"sourcesContent": ["import { asValue } from 'awilix'\nimport type { AppContainer } from '@open-mercato/shared/lib/di/container'\nimport {\n registerGatewayAdapter,\n registerPaymentGatewayDescriptor,\n} from '@open-mercato/shared/modules/payment_gateways/types'\nimport { autopayHealthCheck } from './lib/health'\nimport { autopayAdapterV1 } from './lib/adapters/v1'\n\
|
|
5
|
-
"mappings": "AAAA,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;
|
|
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} from '@open-mercato/shared/modules/payment_gateways/types'\nimport { autopayHealthCheck } from './lib/health'\nimport { autopayAdapterV1 } from './lib/adapters/v1'\n\nfunction registerWithActivation(container: AppContainer, activate: (callback: () => void) => void) {\n activate(() => {\n registerGatewayAdapter(autopayAdapterV1, { version: 'v1' })\n })\n\n activate(() => {\n registerPaymentGatewayDescriptor({\n providerKey: 'autopay',\n label: 'Autopay',\n requiresPayerFields: ['email'],\n sessionConfig: {\n supportedCurrencies: ['PLN'],\n defaultRendererKey: 'autopay.hosted_redirect',\n renderers: [\n {\n key: 'autopay.hosted_redirect',\n label: 'Autopay Hosted Redirect',\n type: 'redirect',\n description: 'Redirects the payer to Autopay\\'s hosted payment page (bank transfer, BLIK, cards).',\n supportedPaymentTypes: '*',\n },\n ],\n },\n })\n })\n\n container.register({\n autopayHealthCheck: asValue(autopayHealthCheck),\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,OACK;AACP,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AAEjC,SAAS,uBAAuB,WAAyB,UAA0C;AACjG,WAAS,MAAM;AACb,2BAAuB,kBAAkB,EAAE,SAAS,KAAK,CAAC;AAAA,EAC5D,CAAC;AAED,WAAS,MAAM;AACb,qCAAiC;AAAA,MAC/B,aAAa;AAAA,MACb,OAAO;AAAA,MACP,qBAAqB,CAAC,OAAO;AAAA,MAC7B,eAAe;AAAA,QACb,qBAAqB,CAAC,KAAK;AAAA,QAC3B,oBAAoB;AAAA,QACpB,WAAW;AAAA,UACT;AAAA,YACE,KAAK;AAAA,YACL,OAAO;AAAA,YACP,MAAM;AAAA,YACN,aAAa;AAAA,YACb,uBAAuB;AAAA,UACzB;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AAED,YAAU,SAAS;AAAA,IACjB,oBAAoB,QAAQ,kBAAkB;AAAA,EAChD,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-autopay",
|
|
3
|
-
"version": "0.11.1-develop.
|
|
3
|
+
"version": "0.11.1-develop.8418.1.8ddb502575",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Autopay Online v1.1 hosted PLN payment gateway provider for Open Mercato",
|
|
6
6
|
"type": "module",
|
|
@@ -63,19 +63,19 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@open-mercato/core": "0.11.1-develop.
|
|
66
|
+
"@open-mercato/core": "0.11.1-develop.8418.1.8ddb502575"
|
|
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.
|
|
77
|
+
"@open-mercato/ai-assistant": "0.11.1-develop.8418.1.8ddb502575",
|
|
78
|
+
"@open-mercato/shared": "0.11.1-develop.8418.1.8ddb502575",
|
|
79
79
|
"@types/jest": "^30.0.0",
|
|
80
80
|
"esbuild": "^0.28.1",
|
|
81
81
|
"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 {
|
|
@@ -7,29 +8,41 @@ import {
|
|
|
7
8
|
import { autopayHealthCheck } from './lib/health'
|
|
8
9
|
import { autopayAdapterV1 } from './lib/adapters/v1'
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
function registerWithActivation(container: AppContainer, activate: (callback: () => void) => void) {
|
|
12
|
+
activate(() => {
|
|
13
|
+
registerGatewayAdapter(autopayAdapterV1, { version: 'v1' })
|
|
14
|
+
})
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
activate(() => {
|
|
17
|
+
registerPaymentGatewayDescriptor({
|
|
18
|
+
providerKey: 'autopay',
|
|
19
|
+
label: 'Autopay',
|
|
20
|
+
requiresPayerFields: ['email'],
|
|
21
|
+
sessionConfig: {
|
|
22
|
+
supportedCurrencies: ['PLN'],
|
|
23
|
+
defaultRendererKey: 'autopay.hosted_redirect',
|
|
24
|
+
renderers: [
|
|
25
|
+
{
|
|
26
|
+
key: 'autopay.hosted_redirect',
|
|
27
|
+
label: 'Autopay Hosted Redirect',
|
|
28
|
+
type: 'redirect',
|
|
29
|
+
description: 'Redirects the payer to Autopay\'s hosted payment page (bank transfer, BLIK, cards).',
|
|
30
|
+
supportedPaymentTypes: '*',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
})
|
|
30
35
|
})
|
|
31
36
|
|
|
32
37
|
container.register({
|
|
33
38
|
autopayHealthCheck: asValue(autopayHealthCheck),
|
|
34
39
|
})
|
|
35
40
|
}
|
|
41
|
+
|
|
42
|
+
export function register(container: AppContainer): void {
|
|
43
|
+
registerWithActivation(container, (activate) => activate())
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
defineProcessDiRegistrar((container: AppContainer) => {
|
|
47
|
+
registerWithActivation(container, (activate) => registerProcessActivation(container, activate))
|
|
48
|
+
}, { legacy: register })
|