@yosle/tropipayjs 0.1.22 → 0.1.24
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/.nvmrc +1 -1
- package/.vscode/launch.json +18 -18
- package/LICENSE +9 -9
- package/README.md +152 -152
- package/api/TropipayAPI.d.ts +2 -0
- package/docs/readme.md +3 -3
- package/globals.d.ts +75 -75
- package/index.d.ts +11 -6
- package/index.js +910 -870
- package/interfaces/countries/index.d.ts +1 -1
- package/interfaces/index.d.ts +9 -6
- package/jest.config.js +5 -5
- package/package.json +49 -49
- package/paymentcard/paymentcard.spec.d.ts +1 -1
- package/rollup.config.js +24 -24
- package/src/api/TropipayAPI.ts +383 -338
- package/src/config/TropipayConfig.ts +2 -2
- package/src/constants/TropipayConstants.ts +2 -2
- package/src/depositAccount/depositAccounts.ts +139 -139
- package/src/hooks/TropipayHooks.ts +154 -154
- package/src/index.ts +28 -28
- package/src/interfaces/depositaccounts/index.ts +70 -70
- package/src/interfaces/index.js +1 -1
- package/src/interfaces/index.ts +201 -197
- package/src/interfaces/mediation/index.ts +22 -22
- package/src/interfaces/paymentlink/index.d.ts +36 -36
- package/src/interfaces/paymentlink/index.js +2 -2
- package/src/interfaces/paymentlink/index.ts +91 -91
- package/src/mediationPaymentCard/MediationPaymentCard.ts +42 -42
- package/src/paymentcard/PaymentCard.ts +123 -123
- package/src/paymentcard/paymentcard.spec.ts +79 -79
- package/src/utils/TropipayUtils.ts +126 -126
- package/src/utils/errors.ts +92 -92
- package/tsconfig.json +96 -96
|
@@ -1 +1 @@
|
|
|
1
|
-
export type TropipayCountry = {};
|
|
1
|
+
export type TropipayCountry = {};
|
package/interfaces/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface TropipayConfig {
|
|
|
9
9
|
clientSecret: string;
|
|
10
10
|
scopes?: string[];
|
|
11
11
|
serverMode?: ServerMode;
|
|
12
|
+
customTropipayUrl?: string;
|
|
12
13
|
}
|
|
13
14
|
export type TropipayCredentials = {
|
|
14
15
|
clientId: string;
|
|
@@ -49,14 +50,16 @@ export interface PaymentLinkPayload {
|
|
|
49
50
|
urlFailed: string;
|
|
50
51
|
urlNotification: string;
|
|
51
52
|
serviceDate: string;
|
|
52
|
-
client
|
|
53
|
-
name
|
|
54
|
-
lastName
|
|
55
|
-
address
|
|
56
|
-
phone
|
|
57
|
-
email
|
|
53
|
+
client?: {
|
|
54
|
+
name?: string;
|
|
55
|
+
lastName?: string;
|
|
56
|
+
address?: string;
|
|
57
|
+
phone?: string;
|
|
58
|
+
email?: string;
|
|
58
59
|
countryId?: number;
|
|
59
60
|
countryIso?: string;
|
|
61
|
+
city: string;
|
|
62
|
+
postCode: string;
|
|
60
63
|
termsAndConditions: boolean;
|
|
61
64
|
} | null;
|
|
62
65
|
directPayment: boolean;
|
package/jest.config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
preset: "ts-jest",
|
|
4
|
-
testEnvironment: "node",
|
|
5
|
-
};
|
|
1
|
+
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
preset: "ts-jest",
|
|
4
|
+
testEnvironment: "node",
|
|
5
|
+
};
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@yosle/tropipayjs",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Javascript / Typescript SDK for the Tropipay API",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "jest --passWithNoTests --updateSnapshot --coverage",
|
|
8
|
-
"_clear": "rimraf src/dist/*",
|
|
9
|
-
"_tsc": "tsc",
|
|
10
|
-
"_make-bundle": "rollup --config",
|
|
11
|
-
"build": "
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "https://github.com/yosle/tropipayjs"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"Javascript",
|
|
19
|
-
"Typescript",
|
|
20
|
-
"Tropipay",
|
|
21
|
-
"payments",
|
|
22
|
-
"gateway",
|
|
23
|
-
"API"
|
|
24
|
-
],
|
|
25
|
-
"author": "Yosleivy Baez Acosta <yosle007@gmail.com>",
|
|
26
|
-
"license": "MIT",
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"axios": "^1.6.0",
|
|
29
|
-
"tslib": "^2.4.0"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@rollup/plugin-typescript": "^8.5.0",
|
|
33
|
-
"@types/jest": "^29.5.12",
|
|
34
|
-
"@types/node": "^20.12.7",
|
|
35
|
-
"@types/tough-cookie": "^4.0.5",
|
|
36
|
-
"babel-jest": "^29.7.0",
|
|
37
|
-
"jest": "^29.7.0",
|
|
38
|
-
"rimraf": "^3.0.2",
|
|
39
|
-
"rollup": "^2.79.1",
|
|
40
|
-
"rollup-plugin-dts": "^4.2.2",
|
|
41
|
-
"run-s": "^0.0.0",
|
|
42
|
-
"ts-jest": "^29.1.2",
|
|
43
|
-
"typescript": "^5.4.5"
|
|
44
|
-
},
|
|
45
|
-
"funding": {
|
|
46
|
-
"type": "individual",
|
|
47
|
-
"url": "https://tppay.me/l94qaa3h"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@yosle/tropipayjs",
|
|
3
|
+
"version": "0.1.24",
|
|
4
|
+
"description": "Javascript / Typescript SDK for the Tropipay API",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "jest --passWithNoTests --updateSnapshot --coverage",
|
|
8
|
+
"_clear": "rimraf src/dist/*",
|
|
9
|
+
"_tsc": "tsc",
|
|
10
|
+
"_make-bundle": "rollup --config",
|
|
11
|
+
"build": "npm run _clear && npm run _tsc && npm run _make-bundle"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/yosle/tropipayjs"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"Javascript",
|
|
19
|
+
"Typescript",
|
|
20
|
+
"Tropipay",
|
|
21
|
+
"payments",
|
|
22
|
+
"gateway",
|
|
23
|
+
"API"
|
|
24
|
+
],
|
|
25
|
+
"author": "Yosleivy Baez Acosta <yosle007@gmail.com>",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"axios": "^1.6.0",
|
|
29
|
+
"tslib": "^2.4.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@rollup/plugin-typescript": "^8.5.0",
|
|
33
|
+
"@types/jest": "^29.5.12",
|
|
34
|
+
"@types/node": "^20.12.7",
|
|
35
|
+
"@types/tough-cookie": "^4.0.5",
|
|
36
|
+
"babel-jest": "^29.7.0",
|
|
37
|
+
"jest": "^29.7.0",
|
|
38
|
+
"rimraf": "^3.0.2",
|
|
39
|
+
"rollup": "^2.79.1",
|
|
40
|
+
"rollup-plugin-dts": "^4.2.2",
|
|
41
|
+
"run-s": "^0.0.0",
|
|
42
|
+
"ts-jest": "^29.1.2",
|
|
43
|
+
"typescript": "^5.4.5"
|
|
44
|
+
},
|
|
45
|
+
"funding": {
|
|
46
|
+
"type": "individual",
|
|
47
|
+
"url": "https://tppay.me/l94qaa3h"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
declare function sum(a: number, b: number): number;
|
|
1
|
+
declare function sum(a: number, b: number): number;
|
package/rollup.config.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
// Contents of the file /rollup.config.js
|
|
2
|
-
import typescript from "@rollup/plugin-typescript";
|
|
3
|
-
import dts from "rollup-plugin-dts";
|
|
4
|
-
const config = [
|
|
5
|
-
{
|
|
6
|
-
input: "dist/index.js",
|
|
7
|
-
output: {
|
|
8
|
-
file: "index.js",
|
|
9
|
-
format: "cjs",
|
|
10
|
-
sourcemap: true,
|
|
11
|
-
},
|
|
12
|
-
external: ["axios", "crypto", "fs/promises"],
|
|
13
|
-
plugins: [typescript()],
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
input: "dist/index.d.ts",
|
|
17
|
-
output: {
|
|
18
|
-
file: "index.d.ts",
|
|
19
|
-
format: "es",
|
|
20
|
-
},
|
|
21
|
-
plugins: [dts()],
|
|
22
|
-
},
|
|
23
|
-
];
|
|
24
|
-
export default config;
|
|
1
|
+
// Contents of the file /rollup.config.js
|
|
2
|
+
import typescript from "@rollup/plugin-typescript";
|
|
3
|
+
import dts from "rollup-plugin-dts";
|
|
4
|
+
const config = [
|
|
5
|
+
{
|
|
6
|
+
input: "dist/index.js",
|
|
7
|
+
output: {
|
|
8
|
+
file: "index.js",
|
|
9
|
+
format: "cjs",
|
|
10
|
+
sourcemap: true,
|
|
11
|
+
},
|
|
12
|
+
external: ["axios", "crypto", "fs/promises"],
|
|
13
|
+
plugins: [typescript()],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
input: "dist/index.d.ts",
|
|
17
|
+
output: {
|
|
18
|
+
file: "index.d.ts",
|
|
19
|
+
format: "es",
|
|
20
|
+
},
|
|
21
|
+
plugins: [dts()],
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
export default config;
|