@sohis/node-przelewy24 2.1.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.
Files changed (147) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +147 -0
  3. package/dist/enums/Channel.d.ts +18 -0
  4. package/dist/enums/Channel.d.ts.map +1 -0
  5. package/dist/enums/Channel.js +22 -0
  6. package/dist/enums/Channel.js.map +1 -0
  7. package/dist/enums/Country.d.ts +67 -0
  8. package/dist/enums/Country.d.ts.map +1 -0
  9. package/dist/enums/Country.js +71 -0
  10. package/dist/enums/Country.js.map +1 -0
  11. package/dist/enums/Currency.d.ts +36 -0
  12. package/dist/enums/Currency.d.ts.map +1 -0
  13. package/dist/enums/Currency.js +40 -0
  14. package/dist/enums/Currency.js.map +1 -0
  15. package/dist/enums/Encoding.d.ts +35 -0
  16. package/dist/enums/Encoding.d.ts.map +1 -0
  17. package/dist/enums/Encoding.js +39 -0
  18. package/dist/enums/Encoding.js.map +1 -0
  19. package/dist/enums/Language.d.ts +37 -0
  20. package/dist/enums/Language.d.ts.map +1 -0
  21. package/dist/enums/Language.js +41 -0
  22. package/dist/enums/Language.js.map +1 -0
  23. package/dist/enums/ShippingType.d.ts +13 -0
  24. package/dist/enums/ShippingType.d.ts.map +1 -0
  25. package/dist/enums/ShippingType.js +17 -0
  26. package/dist/enums/ShippingType.js.map +1 -0
  27. package/dist/enums/index.d.ts +7 -0
  28. package/dist/enums/index.d.ts.map +1 -0
  29. package/dist/enums/index.js +23 -0
  30. package/dist/enums/index.js.map +1 -0
  31. package/dist/errors/P24Error.d.ts +35 -0
  32. package/dist/errors/P24Error.d.ts.map +1 -0
  33. package/dist/errors/P24Error.js +42 -0
  34. package/dist/errors/P24Error.js.map +1 -0
  35. package/dist/errors/index.d.ts +2 -0
  36. package/dist/errors/index.d.ts.map +1 -0
  37. package/dist/errors/index.js +18 -0
  38. package/dist/errors/index.js.map +1 -0
  39. package/dist/index.d.ts +8 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +24 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/orders/Additional.d.ts +17 -0
  44. package/dist/orders/Additional.d.ts.map +1 -0
  45. package/dist/orders/Additional.js +3 -0
  46. package/dist/orders/Additional.js.map +1 -0
  47. package/dist/orders/CartItem.d.ts +58 -0
  48. package/dist/orders/CartItem.d.ts.map +1 -0
  49. package/dist/orders/CartItem.js +3 -0
  50. package/dist/orders/CartItem.js.map +1 -0
  51. package/dist/orders/Order.d.ts +211 -0
  52. package/dist/orders/Order.d.ts.map +1 -0
  53. package/dist/orders/Order.js +3 -0
  54. package/dist/orders/Order.js.map +1 -0
  55. package/dist/orders/OrderCreatedData.d.ts +10 -0
  56. package/dist/orders/OrderCreatedData.d.ts.map +1 -0
  57. package/dist/orders/OrderCreatedData.js +3 -0
  58. package/dist/orders/OrderCreatedData.js.map +1 -0
  59. package/dist/orders/Shipping.d.ts +39 -0
  60. package/dist/orders/Shipping.d.ts.map +1 -0
  61. package/dist/orders/Shipping.js +3 -0
  62. package/dist/orders/Shipping.js.map +1 -0
  63. package/dist/orders/Transaction.d.ts +23 -0
  64. package/dist/orders/Transaction.d.ts.map +1 -0
  65. package/dist/orders/Transaction.js +3 -0
  66. package/dist/orders/Transaction.js.map +1 -0
  67. package/dist/orders/TransactionBySessionIdResponse.d.ts +136 -0
  68. package/dist/orders/TransactionBySessionIdResponse.d.ts.map +1 -0
  69. package/dist/orders/TransactionBySessionIdResponse.js +3 -0
  70. package/dist/orders/TransactionBySessionIdResponse.js.map +1 -0
  71. package/dist/orders/index.d.ts +8 -0
  72. package/dist/orders/index.d.ts.map +1 -0
  73. package/dist/orders/index.js +24 -0
  74. package/dist/orders/index.js.map +1 -0
  75. package/dist/p24/BaseParameters.d.ts +46 -0
  76. package/dist/p24/BaseParameters.d.ts.map +1 -0
  77. package/dist/p24/BaseParameters.js +27 -0
  78. package/dist/p24/BaseParameters.js.map +1 -0
  79. package/dist/p24/P24.d.ts +114 -0
  80. package/dist/p24/P24.d.ts.map +1 -0
  81. package/dist/p24/P24.js +250 -0
  82. package/dist/p24/P24.js.map +1 -0
  83. package/dist/p24/P24Options.d.ts +16 -0
  84. package/dist/p24/P24Options.d.ts.map +1 -0
  85. package/dist/p24/P24Options.js +3 -0
  86. package/dist/p24/P24Options.js.map +1 -0
  87. package/dist/p24/endpoints.d.ts +9 -0
  88. package/dist/p24/endpoints.d.ts.map +1 -0
  89. package/dist/p24/endpoints.js +12 -0
  90. package/dist/p24/endpoints.js.map +1 -0
  91. package/dist/p24/index.d.ts +6 -0
  92. package/dist/p24/index.d.ts.map +1 -0
  93. package/dist/p24/index.js +22 -0
  94. package/dist/p24/index.js.map +1 -0
  95. package/dist/p24/ips.d.ts +2 -0
  96. package/dist/p24/ips.d.ts.map +1 -0
  97. package/dist/p24/ips.js +11 -0
  98. package/dist/p24/ips.js.map +1 -0
  99. package/dist/refund/Refund.d.ts +37 -0
  100. package/dist/refund/Refund.d.ts.map +1 -0
  101. package/dist/refund/Refund.js +3 -0
  102. package/dist/refund/Refund.js.map +1 -0
  103. package/dist/refund/RefundRequest.d.ts +38 -0
  104. package/dist/refund/RefundRequest.d.ts.map +1 -0
  105. package/dist/refund/RefundRequest.js +3 -0
  106. package/dist/refund/RefundRequest.js.map +1 -0
  107. package/dist/refund/RefundResult.d.ts +51 -0
  108. package/dist/refund/RefundResult.d.ts.map +1 -0
  109. package/dist/refund/RefundResult.js +3 -0
  110. package/dist/refund/RefundResult.js.map +1 -0
  111. package/dist/refund/index.d.ts +4 -0
  112. package/dist/refund/index.d.ts.map +1 -0
  113. package/dist/refund/index.js +20 -0
  114. package/dist/refund/index.js.map +1 -0
  115. package/dist/responses/ErrorResponse.d.ts +17 -0
  116. package/dist/responses/ErrorResponse.d.ts.map +1 -0
  117. package/dist/responses/ErrorResponse.js +3 -0
  118. package/dist/responses/ErrorResponse.js.map +1 -0
  119. package/dist/responses/SuccessResponse.d.ts +17 -0
  120. package/dist/responses/SuccessResponse.d.ts.map +1 -0
  121. package/dist/responses/SuccessResponse.js +3 -0
  122. package/dist/responses/SuccessResponse.js.map +1 -0
  123. package/dist/responses/index.d.ts +3 -0
  124. package/dist/responses/index.d.ts.map +1 -0
  125. package/dist/responses/index.js +19 -0
  126. package/dist/responses/index.js.map +1 -0
  127. package/dist/utils/hash.d.ts +2 -0
  128. package/dist/utils/hash.d.ts.map +1 -0
  129. package/dist/utils/hash.js +15 -0
  130. package/dist/utils/hash.js.map +1 -0
  131. package/dist/verify/NotificationRequest.d.ts +82 -0
  132. package/dist/verify/NotificationRequest.d.ts.map +1 -0
  133. package/dist/verify/NotificationRequest.js +3 -0
  134. package/dist/verify/NotificationRequest.js.map +1 -0
  135. package/dist/verify/Verification.d.ts +38 -0
  136. package/dist/verify/Verification.d.ts.map +1 -0
  137. package/dist/verify/Verification.js +3 -0
  138. package/dist/verify/Verification.js.map +1 -0
  139. package/dist/verify/VerificationData.d.ts +16 -0
  140. package/dist/verify/VerificationData.d.ts.map +1 -0
  141. package/dist/verify/VerificationData.js +3 -0
  142. package/dist/verify/VerificationData.js.map +1 -0
  143. package/dist/verify/index.d.ts +4 -0
  144. package/dist/verify/index.d.ts.map +1 -0
  145. package/dist/verify/index.js +20 -0
  146. package/dist/verify/index.js.map +1 -0
  147. package/package.json +36 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"P24Options.js","sourceRoot":"","sources":["../../src/p24/P24Options.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export declare const ProductionUrl: string;
2
+ export declare const SandboxUrl: string;
3
+ export declare const EndpointTestAccess: string;
4
+ export declare const EndpointGetTransactionBySessionID: string;
5
+ export declare const EndpointTransactionRegister: string;
6
+ export declare const EndpointTransactionRequest: string;
7
+ export declare const EndpointTransactionVerify: string;
8
+ export declare const EndpointRefund: string;
9
+ //# sourceMappingURL=endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/p24/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,EAAE,MAAuC,CAAC;AACpE,eAAO,MAAM,UAAU,EAAE,MAAwC,CAAC;AAElE,eAAO,MAAM,kBAAkB,EAAE,MAAsB,CAAA;AACvD,eAAO,MAAM,iCAAiC,EAAE,MAAoC,CAAC;AACrF,eAAO,MAAM,2BAA2B,EAAE,MAAgC,CAAA;AAC1E,eAAO,MAAM,0BAA0B,EAAE,MAAsB,CAAA;AAC/D,eAAO,MAAM,yBAAyB,EAAE,MAA8B,CAAA;AACtE,eAAO,MAAM,cAAc,EAAE,MAA8B,CAAA"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EndpointRefund = exports.EndpointTransactionVerify = exports.EndpointTransactionRequest = exports.EndpointTransactionRegister = exports.EndpointGetTransactionBySessionID = exports.EndpointTestAccess = exports.SandboxUrl = exports.ProductionUrl = void 0;
4
+ exports.ProductionUrl = 'https://secure.przelewy24.pl';
5
+ exports.SandboxUrl = 'https://sandbox.przelewy24.pl';
6
+ exports.EndpointTestAccess = '/testAccess';
7
+ exports.EndpointGetTransactionBySessionID = '/transaction/by/sessionId';
8
+ exports.EndpointTransactionRegister = '/transaction/register';
9
+ exports.EndpointTransactionRequest = '/trnRequest';
10
+ exports.EndpointTransactionVerify = '/transaction/verify';
11
+ exports.EndpointRefund = '/transaction/refund';
12
+ //# sourceMappingURL=endpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../src/p24/endpoints.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAW,8BAA8B,CAAC;AACvD,QAAA,UAAU,GAAW,+BAA+B,CAAC;AAErD,QAAA,kBAAkB,GAAW,aAAa,CAAA;AAC1C,QAAA,iCAAiC,GAAW,2BAA2B,CAAC;AACxE,QAAA,2BAA2B,GAAW,uBAAuB,CAAA;AAC7D,QAAA,0BAA0B,GAAW,aAAa,CAAA;AAClD,QAAA,yBAAyB,GAAW,qBAAqB,CAAA;AACzD,QAAA,cAAc,GAAW,qBAAqB,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './BaseParameters';
2
+ export * from './endpoints';
3
+ export * from './ips';
4
+ export * from './P24';
5
+ export * from './P24Options';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/p24/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./BaseParameters"), exports);
18
+ __exportStar(require("./endpoints"), exports);
19
+ __exportStar(require("./ips"), exports);
20
+ __exportStar(require("./P24"), exports);
21
+ __exportStar(require("./P24Options"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/p24/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,8CAA4B;AAC5B,wCAAsB;AACtB,wCAAsB;AACtB,+CAA6B"}
@@ -0,0 +1,2 @@
1
+ export declare const validIps: string[];
2
+ //# sourceMappingURL=ips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ips.d.ts","sourceRoot":"","sources":["../../src/p24/ips.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,UAMpB,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validIps = void 0;
4
+ exports.validIps = [
5
+ '91.216.191.181',
6
+ '91.216.191.182',
7
+ '91.216.191.183',
8
+ '91.216.191.184',
9
+ '91.216.191.185',
10
+ ];
11
+ //# sourceMappingURL=ips.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ips.js","sourceRoot":"","sources":["../../src/p24/ips.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACpB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;CACnB,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Refund
3
+ *
4
+ * @export
5
+ * @interface Refund
6
+ */
7
+ export interface Refund {
8
+ /**
9
+ * Transaction order ID from Przelewy24
10
+ *
11
+ * @type {number}
12
+ * @memberof Refund
13
+ */
14
+ orderId: number;
15
+ /**
16
+ * Transaction session ID from the Partner’s system
17
+ *
18
+ * @type {string}
19
+ * @memberof Refund
20
+ */
21
+ sessionId: string;
22
+ /**
23
+ * Amount of refund
24
+ *
25
+ * @type {number}
26
+ * @memberof Refund
27
+ */
28
+ amount: number;
29
+ /**
30
+ * Refund description visible in transfer details
31
+ *
32
+ * @type {string}
33
+ * @memberof Refund
34
+ */
35
+ description: string;
36
+ }
37
+ //# sourceMappingURL=Refund.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Refund.d.ts","sourceRoot":"","sources":["../../src/refund/Refund.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACnB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAA;CACtB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Refund.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Refund.js","sourceRoot":"","sources":["../../src/refund/Refund.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ import { Refund } from "./Refund";
2
+ /**
3
+ * Refund request
4
+ *
5
+ * @export
6
+ * @interface RefundRequest
7
+ */
8
+ export interface RefundRequest {
9
+ /**
10
+ * Individual request ID
11
+ *
12
+ * @type {string}
13
+ * @memberof RefundRequest
14
+ */
15
+ requestId: string;
16
+ /**
17
+ * Refunds
18
+ *
19
+ * @type {Refund[]}
20
+ * @memberof RefundRequest
21
+ */
22
+ refunds: Refund[];
23
+ /**
24
+ * Individual ID for a correct refund request in the merchant’s system
25
+ *
26
+ * @type {string}
27
+ * @memberof RefundRequest
28
+ */
29
+ refundsUuid: string;
30
+ /**
31
+ * Notification address for the refund batch transferred
32
+ *
33
+ * @type {string}
34
+ * @memberof RefundRequest
35
+ */
36
+ urlStatus?: string;
37
+ }
38
+ //# sourceMappingURL=RefundRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefundRequest.d.ts","sourceRoot":"","sources":["../../src/refund/RefundRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RefundRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefundRequest.js","sourceRoot":"","sources":["../../src/refund/RefundRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Refund result
3
+ *
4
+ * @export
5
+ * @interface RefundResult
6
+ */
7
+ export interface RefundResult {
8
+ /**
9
+ * Transaction order ID from Przelewy24
10
+ *
11
+ * @type {string}
12
+ * @memberof RefundResult
13
+ */
14
+ orderId: string;
15
+ /**
16
+ * Transaction session ID from the Partner’s system
17
+ *
18
+ * @type {string}
19
+ * @memberof RefundResult
20
+ */
21
+ sessionId: string;
22
+ /**
23
+ * Amount of refund
24
+ *
25
+ * @type {string}
26
+ * @memberof RefundResult
27
+ */
28
+ amount: string;
29
+ /**
30
+ * Transaction description
31
+ *
32
+ * @type {string}
33
+ * @memberof RefundResult
34
+ */
35
+ description: string;
36
+ /**
37
+ * Was refund attempt successful?
38
+ *
39
+ * @type {boolean}
40
+ * @memberof RefundResult
41
+ */
42
+ status: boolean;
43
+ /**
44
+ * Text description of successful refund
45
+ *
46
+ * @type {string}
47
+ * @memberof RefundResult
48
+ */
49
+ message: string;
50
+ }
51
+ //# sourceMappingURL=RefundResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefundResult.d.ts","sourceRoot":"","sources":["../../src/refund/RefundResult.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IACzB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RefundResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefundResult.js","sourceRoot":"","sources":["../../src/refund/RefundResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './Refund';
2
+ export * from './RefundRequest';
3
+ export * from './RefundResult';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/refund/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Refund"), exports);
18
+ __exportStar(require("./RefundRequest"), exports);
19
+ __exportStar(require("./RefundResult"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/refund/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,kDAAgC;AAChC,iDAA+B"}
@@ -0,0 +1,17 @@
1
+ export interface ErrorResponse<T> {
2
+ /**
3
+ * Error
4
+ *
5
+ * @type {T}
6
+ * @memberof ErrorResponse
7
+ */
8
+ error: T;
9
+ /**
10
+ * Error code
11
+ *
12
+ * @type {number}
13
+ * @memberof ErrorResponse
14
+ */
15
+ code: number;
16
+ }
17
+ //# sourceMappingURL=ErrorResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorResponse.d.ts","sourceRoot":"","sources":["../../src/responses/ErrorResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa,CAAC,CAAC;IAC5B;;;;;OAKG;IACH,KAAK,EAAE,CAAC,CAAC;IAET;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAA;CACf"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ErrorResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorResponse.js","sourceRoot":"","sources":["../../src/responses/ErrorResponse.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ export interface SuccessResponse<T> {
2
+ /**
3
+ * Response code
4
+ *
5
+ * @type {string}
6
+ * @memberof SuccessResponse
7
+ */
8
+ responseCode: string;
9
+ /**
10
+ * Response data
11
+ *
12
+ * @type {T}
13
+ * @memberof SuccessResponse
14
+ */
15
+ data: T;
16
+ }
17
+ //# sourceMappingURL=SuccessResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuccessResponse.d.ts","sourceRoot":"","sources":["../../src/responses/SuccessResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe,CAAC,CAAC;IAC9B;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,IAAI,EAAE,CAAC,CAAA;CACV"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SuccessResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuccessResponse.js","sourceRoot":"","sources":["../../src/responses/SuccessResponse.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './ErrorResponse';
2
+ export * from './SuccessResponse';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ErrorResponse"), exports);
18
+ __exportStar(require("./SuccessResponse"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,oDAAkC"}
@@ -0,0 +1,2 @@
1
+ export declare function calculateSHA384(data: string): string;
2
+ //# sourceMappingURL=hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/utils/hash.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrD"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.calculateSHA384 = void 0;
7
+ const crypto_1 = __importDefault(require("crypto"));
8
+ function calculateSHA384(data) {
9
+ return crypto_1.default
10
+ .createHash('sha384')
11
+ .update(data, 'utf8')
12
+ .digest('hex');
13
+ }
14
+ exports.calculateSHA384 = calculateSHA384;
15
+ //# sourceMappingURL=hash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.js","sourceRoot":"","sources":["../../src/utils/hash.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,SAAgB,eAAe,CAAE,IAAY;IACzC,OAAO,gBAAM;SACR,UAAU,CAAC,QAAQ,CAAC;SACpB,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;SACpB,MAAM,CAAC,KAAK,CAAC,CAAA;AACtB,CAAC;AALD,0CAKC"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Notification request
3
+ *
4
+ * @export
5
+ * @interface NotificationRequest
6
+ */
7
+ export interface NotificationRequest {
8
+ /**
9
+ * Merchant identification number
10
+ *
11
+ * @type {number}
12
+ * @memberof NotificationRequest
13
+ */
14
+ merchantId: number;
15
+ /**
16
+ * Shop identification number (defaults to merchant ID)
17
+ *
18
+ * @type {number}
19
+ * @memberof NotificationRequest
20
+ */
21
+ posId: number;
22
+ /**
23
+ * Unique identifier from merchant's system
24
+ *
25
+ * @type {string}
26
+ * @memberof NotificationRequest
27
+ */
28
+ sessionId: string;
29
+ /**
30
+ * Transaction amount expressed in lowest currency unit, e.g. 1.23 PLN = 123
31
+ *
32
+ * @type {number}
33
+ * @memberof NotificationRequest
34
+ */
35
+ amount: number;
36
+ /**
37
+ * Transaction amount expressed in lowest currency unit, e.g. 1.23 PLN = 123
38
+ *
39
+ * @type {number}
40
+ * @memberof NotificationRequest
41
+ */
42
+ originAmount: number;
43
+ /**
44
+ * Currency compatible with ISO, e.g. PLN
45
+ *
46
+ * @type {string}
47
+ * @memberof NotificationRequest
48
+ */
49
+ currency: string;
50
+ /**
51
+ * Transaction number assigned by P24
52
+ *
53
+ * @type {number}
54
+ * @memberof NotificationRequest
55
+ */
56
+ orderId: number;
57
+ /**
58
+ * Payment method used by customer
59
+ *
60
+ * @type {number}
61
+ * @memberof NotificationRequest
62
+ */
63
+ methodId: number;
64
+ /**
65
+ * Payment title
66
+ *
67
+ * @type {string}
68
+ * @memberof NotificationRequest
69
+ */
70
+ statement: string;
71
+ /**
72
+ * Checksum of parameters:
73
+ * ( {"merchantId": int, "posId": int, "sessionId": "string", "amount": int, "originAmount": int, "currency": "string", "orderId": int, "methodId": int, "statement": string, "crc": "string"} )
74
+ *
75
+ * calculated with the use of sha384
76
+ *
77
+ * @type {string}
78
+ * @memberof NotificationRequest
79
+ */
80
+ sign: string;
81
+ }
82
+ //# sourceMappingURL=NotificationRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationRequest.d.ts","sourceRoot":"","sources":["../../src/verify/NotificationRequest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,IAAI,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=NotificationRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationRequest.js","sourceRoot":"","sources":["../../src/verify/NotificationRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Transaction verification
3
+ *
4
+ * @export
5
+ * @interface TransactionVerification
6
+ */
7
+ export interface Verification {
8
+ /**
9
+ * Session ID from merchant's system
10
+ *
11
+ * @type {string}
12
+ * @memberof TransactionVerification
13
+ */
14
+ sessionId: string;
15
+ /**
16
+ * Transaction amount which format is presented as amount in lowest currency
17
+ * unit, e.g. 1.23 PLN = 123
18
+ *
19
+ * @type {number}
20
+ * @memberof TransactionVerification
21
+ */
22
+ amount: number;
23
+ /**
24
+ * Currency
25
+ *
26
+ * @type {string}
27
+ * @memberof TransactionVerification
28
+ */
29
+ currency: string;
30
+ /**
31
+ * Id of an order
32
+ *
33
+ * @type {number}
34
+ * @memberof TransactionVerification
35
+ */
36
+ orderId: number;
37
+ }
38
+ //# sourceMappingURL=Verification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Verification.d.ts","sourceRoot":"","sources":["../../src/verify/Verification.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IACzB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Verification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Verification.js","sourceRoot":"","sources":["../../src/verify/Verification.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Verification data
3
+ *
4
+ * @export
5
+ * @interface VerificationData
6
+ */
7
+ export interface VerificationData {
8
+ /**
9
+ * Verification status
10
+ *
11
+ * @type {string}
12
+ * @memberof VerificationData
13
+ */
14
+ status: string;
15
+ }
16
+ //# sourceMappingURL=VerificationData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VerificationData.d.ts","sourceRoot":"","sources":["../../src/verify/VerificationData.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAA;CACjB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=VerificationData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VerificationData.js","sourceRoot":"","sources":["../../src/verify/VerificationData.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './NotificationRequest';
2
+ export * from './Verification';
3
+ export * from './VerificationData';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/verify/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./NotificationRequest"), exports);
18
+ __exportStar(require("./Verification"), exports);
19
+ __exportStar(require("./VerificationData"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/verify/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,iDAA+B;AAC/B,qDAAmC"}