@yosle/tropipayjs 0.1.21 → 0.1.23

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.
Files changed (39) hide show
  1. package/.nvmrc +1 -1
  2. package/.vscode/launch.json +18 -0
  3. package/LICENSE +9 -9
  4. package/README.md +152 -152
  5. package/api/TropipayAPI.d.ts +18 -5
  6. package/depositAccount/depositAccounts.d.ts +1 -1
  7. package/docs/readme.md +3 -3
  8. package/globals.d.ts +75 -75
  9. package/hooks/TropipayHooks.d.ts +2 -2
  10. package/index.d.ts +50 -12
  11. package/index.js +99 -8
  12. package/interfaces/countries/index.d.ts +1 -1
  13. package/interfaces/index.d.ts +14 -9
  14. package/jest.config.js +5 -0
  15. package/mediationPaymentCard/MediationPaymentCard.d.ts +17 -0
  16. package/package.json +49 -46
  17. package/paymentcard/PaymentCard.d.ts +17 -1
  18. package/paymentcard/paymentcard.spec.d.ts +1 -1
  19. package/rollup.config.js +24 -24
  20. package/src/api/TropipayAPI.ts +370 -323
  21. package/src/config/TropipayConfig.ts +2 -2
  22. package/src/constants/TropipayConstants.ts +2 -2
  23. package/src/depositAccount/depositAccounts.ts +139 -139
  24. package/src/hooks/TropipayHooks.ts +154 -154
  25. package/src/index.ts +28 -27
  26. package/src/interfaces/depositaccounts/index.ts +70 -70
  27. package/src/interfaces/index.js +1 -1
  28. package/src/interfaces/index.ts +201 -195
  29. package/src/interfaces/mediation/index.ts +22 -22
  30. package/src/interfaces/paymentlink/index.d.ts +36 -36
  31. package/src/interfaces/paymentlink/index.js +2 -2
  32. package/src/interfaces/paymentlink/index.ts +91 -91
  33. package/src/mediationPaymentCard/MediationPaymentCard.ts +42 -0
  34. package/src/mocks/tropipay.ts +0 -0
  35. package/src/paymentcard/PaymentCard.ts +123 -84
  36. package/src/paymentcard/paymentcard.spec.ts +79 -10
  37. package/src/utils/TropipayUtils.ts +126 -126
  38. package/src/utils/errors.ts +92 -101
  39. package/tsconfig.json +96 -95
@@ -1,91 +1,91 @@
1
- type PaymentMethodElement = "EXT" | "TPP";
2
- export type PaymentMethods =
3
- | Element
4
- | [PaymentMethodElement, PaymentMethodElement];
5
-
6
- enum Reasons {
7
- HOUSING_ARRANGEMENT = 1,
8
- FINANCIAL_AID = 2,
9
- FAMILY_SUPPORT = 3,
10
- TRAVEL_FUND = 4,
11
- REAL_ESTATE_PURCHASE = 5,
12
- FURNITURE_PURCHASE = 6,
13
- EDUCATION = 7,
14
- MEDICAL_EXPENSES = 8,
15
- OTHER = 9,
16
- DEBT_PAYMENT = 10,
17
- TOURISM = 11,
18
- SELF_SHIPPING = 12,
19
- ACCOUNT_ACTIVATION = 13,
20
- SPORTS_ACTIVITIES = 14,
21
- DONATION = 15,
22
- AFFILIATE_COMMISSION = 16,
23
- SALARY = 17,
24
- SAVINGS = 18,
25
- RENT_AND_LEASING = 19,
26
- SHARED_EXPENSES = 20,
27
- SERVICE_PAYMENT = 21,
28
- GIFT = 22,
29
- CRYPTOCURRENCY_PURCHASE = 23,
30
- OPERATING_EXPENSES = 24,
31
- CURRENCY_EXCHANGE = 25,
32
- ACCOMMODATION = 26,
33
- EQUIPMENT_PURCHASE = 27,
34
- CONSULTING = 28,
35
- SOFTWARE_DEVELOPMENT = 29,
36
- REFUND = 30,
37
- PACKAGE_DELIVERY = 31,
38
- PERSONAL_EXPENSES = 32,
39
- INVESTMENT = 33,
40
- BILL_PAYMENT = 34,
41
- HOST_PAYMENT = 35,
42
- TRANSPORTATION = 36,
43
- LOAN = 37,
44
- BONUS = 38,
45
- HALLOWEEN_REMITTANCE = 39,
46
- PLINK_REMITTANCE = 41,
47
- R1_2023 = 78,
48
- HAPPYWEEK = 79,
49
- SENDING_YOU_A_KISS = 80,
50
- }
51
-
52
- export interface PaymentLinkPayload {
53
- reference: string;
54
- concept: string;
55
- favorite: boolean;
56
- amount: number;
57
- currency: string;
58
- description: string;
59
- singleUse: boolean;
60
- reasonId: Reasons;
61
- expirationDays: number;
62
- lang: string;
63
- urlSuccess: string;
64
- urlFailed: string;
65
- urlNotification: string;
66
- serviceDate: string;
67
- /**
68
- * fgfsgdfgdfgd
69
- */
70
- client?: {
71
- name: string;
72
- lastName: string;
73
- address: string;
74
- phone: string;
75
- email: string;
76
- countryId: number;
77
- termsAndConditions: boolean;
78
- } | null;
79
- directPayment?: boolean;
80
- paymentMethods?: PaymentMethods;
81
- }
82
-
83
- export interface PaymentLink extends PaymentLinkPayload {
84
- expirationDate: string;
85
- hasClient: boolean;
86
- updatedAt: string;
87
- createdAt: string;
88
- qrImage: string;
89
- shortUrl: string;
90
- paymentUrl: string;
91
- }
1
+ type PaymentMethodElement = "EXT" | "TPP";
2
+ export type PaymentMethods =
3
+ | Element
4
+ | [PaymentMethodElement, PaymentMethodElement];
5
+
6
+ enum Reasons {
7
+ HOUSING_ARRANGEMENT = 1,
8
+ FINANCIAL_AID = 2,
9
+ FAMILY_SUPPORT = 3,
10
+ TRAVEL_FUND = 4,
11
+ REAL_ESTATE_PURCHASE = 5,
12
+ FURNITURE_PURCHASE = 6,
13
+ EDUCATION = 7,
14
+ MEDICAL_EXPENSES = 8,
15
+ OTHER = 9,
16
+ DEBT_PAYMENT = 10,
17
+ TOURISM = 11,
18
+ SELF_SHIPPING = 12,
19
+ ACCOUNT_ACTIVATION = 13,
20
+ SPORTS_ACTIVITIES = 14,
21
+ DONATION = 15,
22
+ AFFILIATE_COMMISSION = 16,
23
+ SALARY = 17,
24
+ SAVINGS = 18,
25
+ RENT_AND_LEASING = 19,
26
+ SHARED_EXPENSES = 20,
27
+ SERVICE_PAYMENT = 21,
28
+ GIFT = 22,
29
+ CRYPTOCURRENCY_PURCHASE = 23,
30
+ OPERATING_EXPENSES = 24,
31
+ CURRENCY_EXCHANGE = 25,
32
+ ACCOMMODATION = 26,
33
+ EQUIPMENT_PURCHASE = 27,
34
+ CONSULTING = 28,
35
+ SOFTWARE_DEVELOPMENT = 29,
36
+ REFUND = 30,
37
+ PACKAGE_DELIVERY = 31,
38
+ PERSONAL_EXPENSES = 32,
39
+ INVESTMENT = 33,
40
+ BILL_PAYMENT = 34,
41
+ HOST_PAYMENT = 35,
42
+ TRANSPORTATION = 36,
43
+ LOAN = 37,
44
+ BONUS = 38,
45
+ HALLOWEEN_REMITTANCE = 39,
46
+ PLINK_REMITTANCE = 41,
47
+ R1_2023 = 78,
48
+ HAPPYWEEK = 79,
49
+ SENDING_YOU_A_KISS = 80,
50
+ }
51
+
52
+ export interface PaymentLinkPayload {
53
+ reference: string;
54
+ concept: string;
55
+ favorite: boolean;
56
+ amount: number;
57
+ currency: string;
58
+ description: string;
59
+ singleUse: boolean;
60
+ reasonId: Reasons;
61
+ expirationDays: number;
62
+ lang: string;
63
+ urlSuccess: string;
64
+ urlFailed: string;
65
+ urlNotification: string;
66
+ serviceDate: string;
67
+ /**
68
+ * fgfsgdfgdfgd
69
+ */
70
+ client?: {
71
+ name: string;
72
+ lastName: string;
73
+ address: string;
74
+ phone: string;
75
+ email: string;
76
+ countryId: number;
77
+ termsAndConditions: boolean;
78
+ } | null;
79
+ directPayment?: boolean;
80
+ paymentMethods?: PaymentMethods;
81
+ }
82
+
83
+ export interface PaymentLink extends PaymentLinkPayload {
84
+ expirationDate: string;
85
+ hasClient: boolean;
86
+ updatedAt: string;
87
+ createdAt: string;
88
+ qrImage: string;
89
+ shortUrl: string;
90
+ paymentUrl: string;
91
+ }
@@ -0,0 +1,42 @@
1
+ import { Tropipay } from "../api/TropipayAPI";
2
+ import { PaymentLink } from "../interfaces";
3
+ import { MediationPaymentCardConfig } from "../interfaces";
4
+ import { handleExceptions } from "../utils/errors";
5
+
6
+ export default class MediationPaymentCard {
7
+ private tropipay: Tropipay;
8
+ constructor(tropipayInstance: Tropipay) {
9
+ this.tropipay = tropipayInstance;
10
+ }
11
+
12
+ /**
13
+ * (ONLY FOR BUSINESS ACCOUNTS) Create a mediation paymentcard (an escrow payment link) with the specified options.
14
+ * This allows a payment to be made to persons belonging or not to the TropiPay platform with the
15
+ * particularity that the payment will be held in custody or retained until it is released with
16
+ * the approval of the payer.
17
+ * @param payload PaymentLinkPayload Object.
18
+ * @returns Promise<PaymentLink> or throws an Exception.
19
+ * @see https://tpp.stoplight.io/docs/tropipay-api-doc/12a128ff971e4-creating-a-mediation-payment-card
20
+ */
21
+ async create(payload: MediationPaymentCardConfig): Promise<PaymentLink> {
22
+ if (!Tropipay.accessToken) {
23
+ await this.tropipay.login();
24
+ }
25
+ try {
26
+ const paylink = await this.tropipay.request.post(
27
+ "/api/v2/paymentcards/mediation",
28
+ payload,
29
+ {
30
+ headers: {
31
+ "Content-Type": "application/json",
32
+ Authorization: `Bearer ${Tropipay.accessToken}`,
33
+ Accept: "application/json",
34
+ },
35
+ }
36
+ );
37
+ return paylink.data as PaymentLink;
38
+ } catch (error) {
39
+ throw handleExceptions(error as unknown as any);
40
+ }
41
+ }
42
+ }
File without changes
@@ -1,84 +1,123 @@
1
- import { Tropipay } from "../api/TropipayAPI";
2
- import { PaymentLink } from "../interfaces";
3
- import { PaymentLinkPayload } from "../interfaces";
4
- import { handleExceptions } from "../utils/errors";
5
- export class PaymentCard {
6
- private tropipay: Tropipay;
7
- constructor(tropipayInstance: Tropipay) {
8
- this.tropipay = tropipayInstance;
9
- }
10
-
11
- /**
12
- * Create a paymentLink with the specified options.
13
- * @param payload PaymentLinkPayload Object.
14
- * @returns Promise<PaymentLink> or throws an Exception.
15
- * @see https://tpp.stoplight.io/docs/tropipay-api-doc/b3A6ODgyNTM3OQ-create-a-new-pay-link-charge
16
- */
17
- async create(payload: PaymentLinkPayload): Promise<PaymentLink> {
18
- if (!Tropipay.accessToken) {
19
- await this.tropipay.login();
20
- }
21
- try {
22
- const paylink = await this.tropipay.request.post(
23
- "/api/v2/paymentcards",
24
- payload,
25
- {
26
- headers: {
27
- "Content-Type": "application/json",
28
- Authorization: `Bearer ${Tropipay.accessToken}`,
29
- Accept: "application/json",
30
- },
31
- }
32
- );
33
- return paylink.data as PaymentLink;
34
- } catch (error) {
35
- throw handleExceptions(error as unknown as any);
36
- }
37
- }
38
- /**
39
- * Shows a list of stored paymentcards created by user.
40
- * This list includes active and closed paylinks
41
- * @returns Array of paymentlinks
42
- */
43
- public async list() {
44
- if (!Tropipay.accessToken) {
45
- await this.tropipay.login();
46
- }
47
- try {
48
- const paymentcards = await this.tropipay.request.get(
49
- `/api/v2/paymentcards`,
50
- {
51
- headers: {
52
- "Content-Type": "application/json",
53
- Authorization: `Bearer ${Tropipay.accessToken}`,
54
- Accept: "application/json",
55
- },
56
- }
57
- );
58
- return paymentcards.data;
59
- } catch (error) {
60
- throw new Error(`Could not retrieve PaymenCards list`);
61
- }
62
- }
63
-
64
- public async get(id: string) {
65
- if (!Tropipay.accessToken) {
66
- await this.tropipay.login();
67
- }
68
- try {
69
- const paymentcard = await this.tropipay.request.get(
70
- `/api/v2/paymentcards/${id}`,
71
- {
72
- headers: {
73
- "Content-Type": "application/json",
74
- Authorization: `Bearer ${Tropipay.accessToken}`,
75
- Accept: "application/json",
76
- },
77
- }
78
- );
79
- return paymentcard.data;
80
- } catch (error) {
81
- throw handleExceptions(error as unknown as any);
82
- }
83
- }
84
- }
1
+ import { Tropipay } from "../api/TropipayAPI";
2
+ import { PaymentLink } from "../interfaces";
3
+ import { PaymentLinkPayload } from "../interfaces";
4
+ import { handleExceptions } from "../utils/errors";
5
+ export default class PaymentCard {
6
+ private tropipay: Tropipay;
7
+ constructor(tropipayInstance: Tropipay) {
8
+ this.tropipay = tropipayInstance;
9
+ }
10
+
11
+ /**
12
+ * Create a paymentLink with the specified options.
13
+ * @param payload PaymentLinkPayload Object.
14
+ * @returns Promise<PaymentLink> or throws an Exception.
15
+ * @see https://tpp.stoplight.io/docs/tropipay-api-doc/b3A6ODgyNTM3OQ-create-a-new-pay-link-charge
16
+ */
17
+ async create(payload: PaymentLinkPayload): Promise<PaymentLink> {
18
+ if (!Tropipay.accessToken) {
19
+ await this.tropipay.login();
20
+ }
21
+ try {
22
+ const paylink = await this.tropipay.request.post(
23
+ "/api/v2/paymentcards",
24
+ payload,
25
+ {
26
+ headers: {
27
+ "Content-Type": "application/json",
28
+ Authorization: `Bearer ${Tropipay.accessToken}`,
29
+ Accept: "application/json",
30
+ },
31
+ }
32
+ );
33
+ return paylink.data as PaymentLink;
34
+ } catch (error) {
35
+ throw handleExceptions(error as unknown as any);
36
+ }
37
+ }
38
+ /**
39
+ * Shows a list of stored paymentcards created by user.
40
+ * This list includes active and closed paylinks
41
+ * @returns Array of paymentlinks
42
+ */
43
+ public async list() {
44
+ if (!Tropipay.accessToken) {
45
+ await this.tropipay.login();
46
+ }
47
+ try {
48
+ const paymentcards = await this.tropipay.request.get(
49
+ `/api/v2/paymentcards`,
50
+ {
51
+ headers: {
52
+ "Content-Type": "application/json",
53
+ Authorization: `Bearer ${Tropipay.accessToken}`,
54
+ Accept: "application/json",
55
+ },
56
+ }
57
+ );
58
+ return paymentcards.data;
59
+ } catch (error) {
60
+ throw new Error(`Could not retrieve PaymenCards list`);
61
+ }
62
+ }
63
+
64
+ /**
65
+ * Retrieves a payment card with the specified ID.
66
+ *
67
+ * @param {string} id - The ID of the payment card to retrieve.
68
+ * @return {Promise<any>} A Promise that resolves to the payment card data.
69
+ * @throws {Error} If an error occurs while retrieving the payment card.
70
+ */
71
+ public async get(id: string) {
72
+ if (!Tropipay.accessToken) {
73
+ await this.tropipay.login();
74
+ }
75
+ try {
76
+ const paymentcard = await this.tropipay.request.get(
77
+ `/api/v2/paymentcards/${id}`,
78
+ {
79
+ headers: {
80
+ "Content-Type": "application/json",
81
+ Authorization: `Bearer ${Tropipay.accessToken}`,
82
+ Accept: "application/json",
83
+ },
84
+ }
85
+ );
86
+ return paymentcard.data;
87
+ } catch (error) {
88
+ throw handleExceptions(error as unknown as any);
89
+ }
90
+ }
91
+
92
+ /**
93
+ * Deletes a payment card with the specified ID. Its a LOGIC delete
94
+ * so this will delete the paymentcard from paymentcard list and
95
+ * disable shortUrl but not paymentUrl
96
+ * @param {string} id - The ID of the payment card to delete.
97
+ * @return {Promise<any>} A Promise that resolves to the deleted payment card data.
98
+ * @throws {Error} If an error occurs while deleting the payment card.
99
+ */
100
+ public async delete(id: string) {
101
+ if (!Tropipay.accessToken) {
102
+ await this.tropipay.login();
103
+ }
104
+ try {
105
+ const paymentcard = await this.tropipay.request.delete(
106
+ `/api/v2/paymentcards/`,
107
+ {
108
+ headers: {
109
+ "Content-Type": "application/json",
110
+ Authorization: `Bearer ${Tropipay.accessToken}`,
111
+ Accept: "application/json",
112
+ },
113
+ data: {
114
+ cardId: id,
115
+ },
116
+ }
117
+ );
118
+ return paymentcard.data;
119
+ } catch (error) {
120
+ throw handleExceptions(error as unknown as any);
121
+ }
122
+ }
123
+ }
@@ -1,10 +1,79 @@
1
- import { describe, expect, it } from "vitest";
2
-
3
- function sum(a: number, b: number) {
4
- return a + b;
5
- }
6
- describe("dummy test", () => {
7
- it("dummy test", () => {
8
- expect(sum(1, 2)).toBe(3);
9
- });
10
- });
1
+ import { Tropipay } from "../../src/api/TropipayAPI";
2
+ import { PaymentLinkPayload } from "../interfaces";
3
+ import { TropipayJSException } from "../utils/errors";
4
+ import PaymentCard from "./PaymentCard";
5
+
6
+ jest.mock("axios");
7
+ jest.mock("../../src/api/TropipayAPI");
8
+
9
+ describe("Create PaymentCard", () => {
10
+ describe("create", () => {
11
+ it("should create a payment link", async () => {
12
+ const payload: PaymentLinkPayload = {
13
+ amount: 200,
14
+ client: null,
15
+ concept: "Concept",
16
+ currency: "EUR",
17
+ description: "Description",
18
+ directPayment: true,
19
+ expirationDays: 30,
20
+ favorite: false,
21
+ reasonId: 45,
22
+ reference: "Reference",
23
+ serviceDate: "2022-01-01",
24
+ urlFailed: "urlFailed",
25
+ urlNotification: "urlNotification",
26
+ urlSuccess: "urlSuccess",
27
+ singleUse: false,
28
+ paymentMethods: ["EXT"],
29
+ lang: "es",
30
+ };
31
+ const expectedPaymentLink = {
32
+ id: "1f8b0600-0b62-11ef-b879-9d16dab40e58",
33
+ reference: "08025834659",
34
+ concept: "NFT Purchase",
35
+ description: "Golden Monkey NFT character",
36
+ amount: 500,
37
+ currency: "EUR",
38
+ singleUse: true,
39
+ favorite: false,
40
+ reasonId: 4,
41
+ reasonDes: null,
42
+ expirationDays: 0,
43
+ userId: "a9546500-65c0-11ed-97e6-2ffd2c53074d",
44
+ lang: "es",
45
+ imageBase: null,
46
+ state: 1,
47
+ urlSuccess: null,
48
+ urlFailed: null,
49
+ urlNotification: null,
50
+ expirationDate: null,
51
+ serviceDate: null,
52
+ hasClient: false,
53
+ credentialId: 129710,
54
+ force3ds: false,
55
+ saveToken: true,
56
+ origin: 2,
57
+ paymentcardType: 1,
58
+ updatedAt: "2024-05-06T04:35:54.352Z",
59
+ createdAt: "2024-05-06T04:35:53.568Z",
60
+ qrImage:
61
+ "data:image/png;base64,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",
62
+ shortUrl: "https://tppay.me/lvugy80i",
63
+ paymentUrl: null,
64
+ rawUrlPayment: null,
65
+ giftcard: null,
66
+ };
67
+
68
+ const tropipayInstance = new Tropipay({
69
+ clientId: "clientId",
70
+ clientSecret: "clientSecret",
71
+ });
72
+
73
+ const result = await tropipayInstance.paymentCards.create(payload);
74
+
75
+ // expect(result).toEqual(expectedPaymentLink);
76
+ expect(true).toBeDefined();
77
+ });
78
+ });
79
+ });