globalpayments-api 3.8.2 → 3.9.0

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 (227) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/LICENSE.md +257 -257
  3. package/README.md +141 -141
  4. package/lib/src/Builders/AuthorizationBuilder.d.ts +14 -1
  5. package/lib/src/Builders/AuthorizationBuilder.js +82 -0
  6. package/lib/src/Builders/AuthorizationBuilder.js.map +1 -1
  7. package/lib/src/Builders/ManagementBuilder.d.ts +10 -1
  8. package/lib/src/Builders/ManagementBuilder.js +12 -0
  9. package/lib/src/Builders/ManagementBuilder.js.map +1 -1
  10. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.d.ts +3 -0
  11. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.js +150 -24
  12. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.js.map +1 -1
  13. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js +24 -2
  14. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js.map +1 -1
  15. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js.map +1 -1
  16. package/lib/src/Builders/TransactionBuilder.d.ts +2 -3
  17. package/lib/src/Builders/TransactionBuilder.js +0 -6
  18. package/lib/src/Builders/TransactionBuilder.js.map +1 -1
  19. package/lib/src/Entities/AlternativePaymentResponse.d.ts +66 -0
  20. package/lib/src/Entities/AlternativePaymentResponse.js +72 -0
  21. package/lib/src/Entities/AlternativePaymentResponse.js.map +1 -0
  22. package/lib/src/Entities/Customer.d.ts +3 -3
  23. package/lib/src/Entities/Customer.js.map +1 -1
  24. package/lib/src/Entities/Enums/MerchantCategory.d.ts +9 -0
  25. package/lib/src/Entities/Enums/MerchantCategory.js +14 -0
  26. package/lib/src/Entities/Enums/MerchantCategory.js.map +1 -0
  27. package/lib/src/Entities/Enums.d.ts +137 -1
  28. package/lib/src/Entities/Enums.js +137 -1
  29. package/lib/src/Entities/Enums.js.map +1 -1
  30. package/lib/src/Entities/OrderDetails.d.ts +6 -0
  31. package/lib/src/Entities/OrderDetails.js +11 -0
  32. package/lib/src/Entities/OrderDetails.js.map +1 -0
  33. package/lib/src/Entities/Transaction.d.ts +4 -1
  34. package/lib/src/Entities/Transaction.js +17 -0
  35. package/lib/src/Entities/Transaction.js.map +1 -1
  36. package/lib/src/Entities/TransactionSummary.d.ts +2 -1
  37. package/lib/src/Entities/TransactionSummary.js +1 -0
  38. package/lib/src/Entities/TransactionSummary.js.map +1 -1
  39. package/lib/src/Entities/index.d.ts +3 -0
  40. package/lib/src/Entities/index.js +3 -0
  41. package/lib/src/Entities/index.js.map +1 -1
  42. package/lib/src/Gateways/GpApiConnector.js +12 -2
  43. package/lib/src/Gateways/GpApiConnector.js.map +1 -1
  44. package/lib/src/Gateways/GpEcomConnector.js.map +1 -1
  45. package/lib/src/Mapping/GpApiMapping.d.ts +1 -1
  46. package/lib/src/Mapping/GpApiMapping.js +84 -3
  47. package/lib/src/Mapping/GpApiMapping.js.map +1 -1
  48. package/lib/src/PaymentMethods/ECheck.d.ts +10 -1
  49. package/lib/src/PaymentMethods/ECheck.js +11 -0
  50. package/lib/src/PaymentMethods/ECheck.js.map +1 -1
  51. package/lib/src/PaymentMethods/TransactionReference.d.ts +3 -2
  52. package/lib/src/PaymentMethods/TransactionReference.js +1 -1
  53. package/lib/src/PaymentMethods/TransactionReference.js.map +1 -1
  54. package/lib/src/Utils/CardUtils.js +4 -5
  55. package/lib/src/Utils/CardUtils.js.map +1 -1
  56. package/lib/src/Utils/StringUtils.js +3 -0
  57. package/lib/src/Utils/StringUtils.js.map +1 -1
  58. package/lib/test/Data/BaseGpApiTestConfig.js +2 -0
  59. package/lib/test/Data/BaseGpApiTestConfig.js.map +1 -1
  60. package/lib/test/Data/TestCards.js +1 -0
  61. package/lib/test/Data/TestCards.js.map +1 -1
  62. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.d.ts +1 -0
  63. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js +1029 -0
  64. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js.map +1 -0
  65. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.d.ts +1 -0
  66. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js +649 -0
  67. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js.map +1 -0
  68. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.d.ts +1 -0
  69. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js +109 -0
  70. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js.map +1 -0
  71. package/lib/test/Integration/Gateways/GpApiConnector/Ach.test.d.ts +1 -0
  72. package/lib/test/Integration/Gateways/GpApiConnector/Ach.test.js +120 -0
  73. package/lib/test/Integration/Gateways/GpApiConnector/Ach.test.js.map +1 -0
  74. package/lib/test/Integration/Gateways/GpApiConnector/Apm.test.d.ts +1 -0
  75. package/lib/test/Integration/Gateways/GpApiConnector/Apm.test.js +425 -0
  76. package/lib/test/Integration/Gateways/GpApiConnector/Apm.test.js.map +1 -0
  77. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.d.ts +1 -0
  78. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js +1025 -0
  79. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js.map +1 -0
  80. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.d.ts +1 -0
  81. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js +439 -0
  82. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js.map +1 -0
  83. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.d.ts +1 -0
  84. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js +143 -0
  85. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js.map +1 -0
  86. package/lib/test/Integration/Gateways/GpApiConnector/EbtCard.test.d.ts +1 -0
  87. package/lib/test/Integration/Gateways/GpApiConnector/EbtCard.test.js +88 -0
  88. package/lib/test/Integration/Gateways/GpApiConnector/EbtCard.test.js.map +1 -0
  89. package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertificationTest.d.ts +1 -0
  90. package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertificationTest.js +639 -0
  91. package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertificationTest.js.map +1 -0
  92. package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.d.ts +1 -0
  93. package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.js +149 -0
  94. package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.js.map +1 -0
  95. package/lib/test/Integration/Gateways/GpApiConnector/ReportingDepositsTest.d.ts +1 -0
  96. package/lib/test/Integration/Gateways/GpApiConnector/ReportingDepositsTest.js +226 -0
  97. package/lib/test/Integration/Gateways/GpApiConnector/ReportingDepositsTest.js.map +1 -0
  98. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.d.ts +1 -0
  99. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js +434 -0
  100. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js.map +1 -0
  101. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.d.ts +1 -0
  102. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js +217 -0
  103. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js.map +1 -0
  104. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.d.ts +1 -0
  105. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js +338 -0
  106. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js.map +1 -0
  107. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.d.ts +1 -0
  108. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js +2446 -0
  109. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js.map +1 -0
  110. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.d.ts +1 -0
  111. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js +506 -0
  112. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js.map +1 -0
  113. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.d.ts +1 -0
  114. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js +1296 -0
  115. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js.map +1 -0
  116. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.d.ts +1 -0
  117. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js +847 -0
  118. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js.map +1 -0
  119. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
  120. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js +215 -0
  121. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  122. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.d.ts +1 -0
  123. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js +99 -0
  124. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js.map +1 -0
  125. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.d.ts +1 -0
  126. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js +133 -0
  127. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js.map +1 -0
  128. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +1 -0
  129. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +59 -0
  130. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +1 -0
  131. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +1 -0
  132. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +378 -0
  133. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +1 -0
  134. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +1 -0
  135. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +86 -0
  136. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +1 -0
  137. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +1 -0
  138. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +1723 -0
  139. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +1 -0
  140. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +1 -0
  141. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +86 -0
  142. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +1 -0
  143. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +1 -0
  144. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +1760 -0
  145. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +1 -0
  146. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +1 -0
  147. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +420 -0
  148. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +1 -0
  149. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +1 -0
  150. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +2221 -0
  151. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +1 -0
  152. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +1 -0
  153. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +392 -0
  154. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +1 -0
  155. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +1 -0
  156. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +88 -0
  157. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +1 -0
  158. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +1 -0
  159. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +72 -0
  160. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +1 -0
  161. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +1 -0
  162. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +143 -0
  163. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +1 -0
  164. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +1 -0
  165. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +147 -0
  166. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +1 -0
  167. package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementTokenTest.d.ts +1 -0
  168. package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementTokenTest.js +48 -0
  169. package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementTokenTest.js.map +1 -0
  170. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +1 -0
  171. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +101 -0
  172. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +1 -0
  173. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +1 -0
  174. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +50 -0
  175. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +1 -0
  176. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.d.ts +1 -0
  177. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js +44 -0
  178. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js.map +1 -0
  179. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.d.ts +1 -0
  180. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js +221 -0
  181. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js.map +1 -0
  182. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.d.ts +1 -0
  183. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js +60 -0
  184. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js.map +1 -0
  185. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.d.ts +1 -0
  186. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js +80 -0
  187. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js.map +1 -0
  188. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.d.ts +1 -0
  189. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js +44 -0
  190. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js.map +1 -0
  191. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.d.ts +1 -0
  192. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js +330 -0
  193. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js.map +1 -0
  194. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.d.ts +1 -0
  195. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js +60 -0
  196. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js.map +1 -0
  197. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.d.ts +1 -0
  198. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js +80 -0
  199. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js.map +1 -0
  200. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.d.ts +1 -0
  201. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js +149 -0
  202. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js.map +1 -0
  203. package/lib/test/Integration/Services/CheckServiceTest.d.ts +1 -0
  204. package/lib/test/Integration/Services/CheckServiceTest.js +45 -0
  205. package/lib/test/Integration/Services/CheckServiceTest.js.map +1 -0
  206. package/lib/test/Integration/Services/CreditServiceTest.d.ts +1 -0
  207. package/lib/test/Integration/Services/CreditServiceTest.js +174 -0
  208. package/lib/test/Integration/Services/CreditServiceTest.js.map +1 -0
  209. package/lib/test/Integration/Services/DebitServiceTest.d.ts +1 -0
  210. package/lib/test/Integration/Services/DebitServiceTest.js +81 -0
  211. package/lib/test/Integration/Services/DebitServiceTest.js.map +1 -0
  212. package/lib/test/Integration/Services/EBTServiceTest.d.ts +1 -0
  213. package/lib/test/Integration/Services/EBTServiceTest.js +64 -0
  214. package/lib/test/Integration/Services/EBTServiceTest.js.map +1 -0
  215. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +1 -0
  216. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +111 -0
  217. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +1 -0
  218. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +1 -0
  219. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +62 -0
  220. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +1 -0
  221. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
  222. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js +34 -0
  223. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  224. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +1 -0
  225. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +125 -0
  226. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +1 -0
  227. package/package.json +1 -1
@@ -0,0 +1,149 @@
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
+ const ava_1 = __importDefault(require("ava"));
7
+ const src_1 = require("../../../../src");
8
+ const Data_1 = require("../../../Data");
9
+ const runSerially = true;
10
+ const test = runSerially ? ava_1.default.serial : ava_1.default;
11
+ const date = new Date();
12
+ const currency = "USD";
13
+ const card = new src_1.CreditCardData();
14
+ card.number = "4263970000005262";
15
+ card.expMonth = (date.getMonth() + 1).toString().padStart(2, "0");
16
+ card.expYear = (date.getFullYear() + 1).toString();
17
+ card.cvn = "131";
18
+ card.cardHolderName = "James Mason";
19
+ test.beforeEach(() => {
20
+ src_1.ServicesContainer.configureService(Data_1.BaseGpApiTestConfig.gpApiSetupConfig(src_1.Channel.CardNotPresent));
21
+ });
22
+ test("verify tokenized payment method", async (t) => {
23
+ const response = await card.tokenize().execute();
24
+ t.truthy(response);
25
+ t.is("SUCCESS", response.responseCode);
26
+ const tokenizedCard = new src_1.CreditCardData();
27
+ tokenizedCard.token = response.token;
28
+ const verifyResponse = await tokenizedCard
29
+ .verify()
30
+ .withCurrency(currency)
31
+ .execute();
32
+ t.truthy(verifyResponse);
33
+ t.is("SUCCESS", verifyResponse.responseCode);
34
+ t.is("VERIFIED", verifyResponse.responseMessage);
35
+ });
36
+ test("verify tokenized payment method with idempotency key", async (t) => {
37
+ const idempotencyKey = src_1.GenerationUtils.getGuuid();
38
+ const response = await card.tokenize().execute();
39
+ t.truthy(response);
40
+ t.is("SUCCESS", response.responseCode);
41
+ const tokenizedCard = new src_1.CreditCardData();
42
+ tokenizedCard.token = response.token;
43
+ const verifyResponse = await tokenizedCard
44
+ .verify()
45
+ .withCurrency(currency)
46
+ .withIdempotencyKey(idempotencyKey)
47
+ .execute();
48
+ t.truthy(verifyResponse);
49
+ t.is("SUCCESS", verifyResponse.responseCode);
50
+ t.is("VERIFIED", verifyResponse.responseMessage);
51
+ const error = await t.throwsAsync(async () => await tokenizedCard
52
+ .verify()
53
+ .withCurrency(currency)
54
+ .withIdempotencyKey(idempotencyKey)
55
+ .execute(), {
56
+ instanceOf: src_1.GatewayError,
57
+ });
58
+ t.truthy(error);
59
+ t.is(error?.responseCode, "40039");
60
+ t.is(error?.message, "Status Code: DUPLICATE_ACTION - Idempotency Key seen before: id=".concat(verifyResponse.transactionId));
61
+ });
62
+ test("update tokenized payment method then verify", async (t) => {
63
+ const response = await card.tokenize().execute();
64
+ t.truthy(response);
65
+ t.is("SUCCESS", response.responseCode);
66
+ const tokenizedCard = new src_1.CreditCardData();
67
+ tokenizedCard.token = response.token;
68
+ tokenizedCard.expMonth = "12";
69
+ tokenizedCard.expYear = "2030";
70
+ t.true(await tokenizedCard.updateTokenExpiry());
71
+ const verifyResponse = await tokenizedCard
72
+ .verify()
73
+ .withCurrency(currency)
74
+ .execute();
75
+ t.truthy(verifyResponse);
76
+ t.is("SUCCESS", verifyResponse.responseCode);
77
+ t.is("VERIFIED", verifyResponse.responseMessage);
78
+ });
79
+ test("verify tokenized payment method with malformed id", async (t) => {
80
+ const tokenizedCard = new src_1.CreditCardData();
81
+ tokenizedCard.token = "This_is_not_a_payment_id";
82
+ const error = await t.throwsAsync(async () => {
83
+ await tokenizedCard.verify().withCurrency(currency).execute();
84
+ }, {
85
+ instanceOf: src_1.GatewayError,
86
+ });
87
+ t.truthy(error);
88
+ t.is(error?.message, "Status Code: INVALID_REQUEST_DATA - payment_method.id: This_is_not_a_payment_id contains unexpected data");
89
+ t.is(error?.responseCode, "40213");
90
+ });
91
+ test("tokenize payment method with missing card number", async (t) => {
92
+ const card = new src_1.CreditCardData();
93
+ card.expMonth = (date.getMonth() + 1).toString().padStart(2, "0");
94
+ card.expYear = (date.getFullYear() + 1).toString();
95
+ const error = await t.throwsAsync(async () => {
96
+ await card.tokenize().execute();
97
+ }, {
98
+ instanceOf: src_1.GatewayError,
99
+ });
100
+ t.truthy(error);
101
+ t.is(error?.message, "Status Code: MANDATORY_DATA_MISSING - Request expects the following fields : number");
102
+ t.is(error?.responseCode, "40005");
103
+ });
104
+ test("verify tokenized payment method with random id", async (t) => {
105
+ const tokenizedCard = new src_1.CreditCardData();
106
+ tokenizedCard.token = "PMT_".concat(src_1.GenerationUtils.getGuuid());
107
+ const error = await t.throwsAsync(async () => {
108
+ await tokenizedCard.verify().withCurrency(currency).execute();
109
+ }, {
110
+ instanceOf: src_1.GatewayError,
111
+ });
112
+ t.truthy(error);
113
+ t.is(error?.message, "Status Code: RESOURCE_NOT_FOUND - payment_method "
114
+ .concat(tokenizedCard.token)
115
+ .concat(" not found at this location."));
116
+ t.is(error?.responseCode, "40116");
117
+ });
118
+ test("update tokenized payment method with malformed id", async (t) => {
119
+ const tokenizedCard = new src_1.CreditCardData();
120
+ tokenizedCard.token = "This_is_not_a_payment_id";
121
+ tokenizedCard.expYear = (date.getFullYear() + 1).toString();
122
+ tokenizedCard.expMonth = (date.getMonth() + 1).toString().padStart(2, "0");
123
+ const error = await t.throwsAsync(async () => {
124
+ await tokenizedCard.updateTokenExpiry();
125
+ }, {
126
+ instanceOf: src_1.GatewayError,
127
+ });
128
+ t.truthy(error);
129
+ t.is(error?.message, "Status Code: INVALID_REQUEST_DATA - payment_method.id: This_is_not_a_payment_id contains unexpected data");
130
+ t.is(error?.responseCode, "40213");
131
+ });
132
+ test("update tokenized payment method with random id", async (t) => {
133
+ const tokenizedCard = new src_1.CreditCardData();
134
+ tokenizedCard.token = "PMT_".concat(src_1.GenerationUtils.getGuuid());
135
+ tokenizedCard.expYear = (date.getFullYear() + 1).toString();
136
+ tokenizedCard.expMonth = (date.getMonth() + 1).toString().padStart(2, "0");
137
+ const error = await t.throwsAsync(async () => {
138
+ await tokenizedCard.updateTokenExpiry();
139
+ }, {
140
+ instanceOf: src_1.GatewayError,
141
+ });
142
+ t.truthy(error);
143
+ t.is(error?.message, "Status Code: RESOURCE_NOT_FOUND - payment_method "
144
+ .concat(tokenizedCard.token)
145
+ .concat(" not found at this location."));
146
+ t.is(error?.responseCode, "40116");
147
+ });
148
+ test.after(() => Data_1.BaseGpApiTestConfig.resetGpApiConfig());
149
+ //# sourceMappingURL=GpApiTokenManagementTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GpApiTokenManagementTest.js","sourceRoot":"","sources":["../../../../../test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.ts"],"names":[],"mappings":";;;;;AAAA,8CAAsB;AACtB,yCAMyB;AACzB,wCAAoD;AAEpD,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,aAAG,CAAC,MAAM,CAAC,CAAC,CAAC,aAAG,CAAC;AAE5C,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;AAExB,MAAM,QAAQ,GAAG,KAAK,CAAC;AAEvB,MAAM,IAAI,GAAG,IAAI,oBAAc,EAAE,CAAC;AAClC,IAAI,CAAC,MAAM,GAAG,kBAAkB,CAAC;AACjC,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAClE,IAAI,CAAC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AAE,CAAC;IAC3C,aAAa,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAe,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChE,aAAa,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC5D,aAAa,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAE3E,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,WAAW,CAC/B,KAAK,IAAI,EAAE;QACT,MAAM,aAAa,CAAC,iBAAiB,EAAE,CAAC;IAC1C,CAAC,EACD;QACE,UAAU,EAAE,kBAAY;KACzB,CACF,CAAC;IAEF,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChB,CAAC,CAAC,EAAE,CACF,KAAK,EAAE,OAAO,EACd,mDAAmD;SAChD,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;SAC3B,MAAM,CAAC,8BAA8B,CAAC,CAC1C,CAAC;IACF,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,0BAAmB,CAAC,gBAAgB,EAAE,CAAC,CAAC"}
@@ -0,0 +1,226 @@
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
+ const ava_1 = __importDefault(require("ava"));
7
+ const src_1 = require("../../../../src");
8
+ const BaseGpApiTestConfig_1 = require("../../../../test/Data/BaseGpApiTestConfig");
9
+ const startDate = new Date(), endDate = new Date();
10
+ startDate.setFullYear(startDate.getFullYear() - 1);
11
+ startDate.setHours(0);
12
+ startDate.setMinutes(0);
13
+ startDate.setSeconds(0);
14
+ endDate.setDate(endDate.getDate() - 1);
15
+ endDate.setHours(0);
16
+ endDate.setMinutes(0);
17
+ endDate.setSeconds(0);
18
+ let depositSummary = new src_1.DepositSummary();
19
+ ava_1.default.before(async () => {
20
+ src_1.ServicesContainer.configureService(BaseGpApiTestConfig_1.BaseGpApiTestConfig.gpApiSetupConfig(src_1.Channel.CardNotPresent));
21
+ const response = await src_1.ReportingService.findDepositsPaged(1, 1)
22
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Asc)
23
+ .where(src_1.SearchCriteria.StartDate, startDate)
24
+ .andWith(src_1.SearchCriteria.EndDate, endDate)
25
+ .execute();
26
+ if (response.result.length === 1) {
27
+ depositSummary = response.result.pop();
28
+ }
29
+ });
30
+ ava_1.default.after(() => BaseGpApiTestConfig_1.BaseGpApiTestConfig.resetGpApiConfig());
31
+ (0, ava_1.default)("report deposit detail", async (t) => {
32
+ const depositId = depositSummary.depositId || "DEP_2342423443";
33
+ try {
34
+ const response = await src_1.ReportingService.depositDetail(depositId).execute();
35
+ t.truthy(response);
36
+ t.true(response instanceof src_1.DepositSummary);
37
+ t.is(depositId, response.depositId);
38
+ }
39
+ catch (e) {
40
+ console.log(e);
41
+ t.true(e.message.includes("Deposit detail failed with"));
42
+ }
43
+ });
44
+ (0, ava_1.default)("report deposit detail - wrong id", async (t) => {
45
+ const depositId = "DEP_0000000001";
46
+ const error = await t.throwsAsync(async () => await src_1.ReportingService.depositDetail(depositId).execute(), {
47
+ instanceOf: src_1.GatewayError,
48
+ });
49
+ t.truthy(error);
50
+ t.is(error?.responseCode, "40118");
51
+ t.true(error?.message.includes(`Status Code: RESOURCE_NOT_FOUND - Deposits ${depositId} not found at this /ucp/settlement/deposits/${depositId}`));
52
+ });
53
+ (0, ava_1.default)("report find deposits by startDate and order by time created", async (t) => {
54
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
55
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
56
+ .where(src_1.SearchCriteria.StartDate, startDate)
57
+ .execute();
58
+ t.truthy(response);
59
+ t.true(response.result.length !== 0);
60
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
61
+ t.truthy(randomDeposit);
62
+ t.true(randomDeposit instanceof src_1.DepositSummary);
63
+ t.true(startDate.getTime() <= new Date(randomDeposit.depositDate).getTime());
64
+ });
65
+ (0, ava_1.default)("report find deposits order by deposit id", async (t) => {
66
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
67
+ .orderBy(src_1.DepositSortProperty.DepositId, src_1.SortDirection.Desc)
68
+ .where(src_1.SearchCriteria.StartDate, startDate)
69
+ .execute();
70
+ t.truthy(response);
71
+ t.true(response.result.length !== 0);
72
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
73
+ t.truthy(randomDeposit);
74
+ t.true(randomDeposit instanceof src_1.DepositSummary);
75
+ });
76
+ (0, ava_1.default)("report find deposits order by status", async (t) => {
77
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
78
+ .orderBy(src_1.DepositSortProperty.Status, src_1.SortDirection.Desc)
79
+ .where(src_1.SearchCriteria.StartDate, startDate)
80
+ .execute();
81
+ t.truthy(response);
82
+ t.true(response.result.length !== 0);
83
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
84
+ t.truthy(randomDeposit);
85
+ t.true(randomDeposit instanceof src_1.DepositSummary);
86
+ });
87
+ (0, ava_1.default)("report find deposits order by type", async (t) => {
88
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
89
+ .orderBy(src_1.DepositSortProperty.Type, src_1.SortDirection.Desc)
90
+ .where(src_1.SearchCriteria.StartDate, startDate)
91
+ .execute();
92
+ t.truthy(response);
93
+ t.true(response.result.length !== 0);
94
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
95
+ t.truthy(randomDeposit);
96
+ t.true(randomDeposit instanceof src_1.DepositSummary);
97
+ });
98
+ (0, ava_1.default)("report find deposits with end date", async (t) => {
99
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
100
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
101
+ .where(src_1.SearchCriteria.StartDate, startDate)
102
+ .andWith(src_1.SearchCriteria.EndDate, endDate)
103
+ .execute();
104
+ t.truthy(response);
105
+ t.true(response.result.length !== 0);
106
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
107
+ t.truthy(randomDeposit);
108
+ t.true(randomDeposit instanceof src_1.DepositSummary);
109
+ });
110
+ (0, ava_1.default)("report find deposits by not found amount", async (t) => {
111
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
112
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
113
+ .where(src_1.SearchCriteria.StartDate, startDate)
114
+ .andWith(src_1.DataServiceCriteria.Amount, 1)
115
+ .execute();
116
+ t.truthy(response);
117
+ t.true(response.result.length === 0);
118
+ });
119
+ (0, ava_1.default)("report find deposits by amount", async (t) => {
120
+ const amount = depositSummary?.amount || 100;
121
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
122
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
123
+ .where(src_1.SearchCriteria.StartDate, startDate)
124
+ .andWith(src_1.DataServiceCriteria.Amount, amount)
125
+ .execute();
126
+ t.truthy(response);
127
+ t.true(response.result.length !== 0);
128
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
129
+ t.truthy(randomDeposit);
130
+ t.true(randomDeposit instanceof src_1.DepositSummary);
131
+ t.true(response.result
132
+ .map((deposit) => deposit.amount)
133
+ .filter((depositAmount) => Number(depositAmount) != amount)
134
+ .length === 0);
135
+ });
136
+ (0, ava_1.default)("report find deposits filter by deposit status", async (t) => {
137
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
138
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
139
+ .where(src_1.SearchCriteria.DepositStatus, "SPLIT_FUNDING")
140
+ .execute();
141
+ t.truthy(response);
142
+ t.true(response.result.length !== 0);
143
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
144
+ t.truthy(randomDeposit);
145
+ t.true(randomDeposit instanceof src_1.DepositSummary);
146
+ t.true(startDate.getTime() <= new Date(randomDeposit.depositDate).getTime());
147
+ t.is(randomDeposit.status, "SPLIT FUNDING");
148
+ });
149
+ (0, ava_1.default)("report find deposits filter by masked account number last4", async (t) => {
150
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
151
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
152
+ .where(src_1.SearchCriteria.AccountNumberLastFour, "9999")
153
+ .execute();
154
+ t.truthy(response);
155
+ t.true(response.result.length !== 0);
156
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
157
+ t.truthy(randomDeposit);
158
+ t.true(randomDeposit instanceof src_1.DepositSummary);
159
+ t.true(startDate.getTime() <= new Date(randomDeposit.depositDate).getTime());
160
+ });
161
+ (0, ava_1.default)("report find deposits filter by system hierarchy", async (t) => {
162
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
163
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
164
+ .where(src_1.DataServiceCriteria.SystemHierarchy, "055-70-024-011-019")
165
+ .execute();
166
+ t.truthy(response);
167
+ t.true(response.result.length !== 0);
168
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
169
+ t.truthy(randomDeposit);
170
+ t.true(randomDeposit instanceof src_1.DepositSummary);
171
+ t.true(startDate.getTime() <= new Date(randomDeposit.depositDate).getTime());
172
+ });
173
+ (0, ava_1.default)("report find deposits filter by wrong system hierarchy", async (t) => {
174
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
175
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
176
+ .where(src_1.DataServiceCriteria.SystemHierarchy, "042-70-013-011-018")
177
+ .execute();
178
+ t.truthy(response);
179
+ t.true(response.result.length == 0);
180
+ });
181
+ (0, ava_1.default)("report find deposits filter by random uuid system hierarchy", async (t) => {
182
+ const error = await t.throwsAsync(async () => {
183
+ await src_1.ReportingService.findDepositsPaged(1, 10)
184
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
185
+ .where(src_1.DataServiceCriteria.SystemHierarchy, src_1.GenerationUtils.getGuuid())
186
+ .execute();
187
+ }, {
188
+ instanceOf: src_1.GatewayError,
189
+ });
190
+ t.truthy(error);
191
+ t.is(error?.message, `Status Code: INVALID_REQUEST_DATA - Invalid Value provided in the input field - system.hierarchy`);
192
+ t.is(error?.responseCode, "40105");
193
+ });
194
+ (0, ava_1.default)("report find deposits filter by merchant id", async (t) => {
195
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
196
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
197
+ .where(src_1.DataServiceCriteria.MerchantId, "101023947262")
198
+ .execute();
199
+ t.truthy(response);
200
+ t.true(response.result.length !== 0);
201
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
202
+ t.truthy(randomDeposit);
203
+ t.true(randomDeposit instanceof src_1.DepositSummary);
204
+ t.true(startDate.getTime() <= new Date(randomDeposit.depositDate).getTime());
205
+ });
206
+ (0, ava_1.default)("report find deposits filter by wrong merchant id", async (t) => {
207
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
208
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
209
+ .where(src_1.DataServiceCriteria.MerchantId, "000023985843")
210
+ .execute();
211
+ t.truthy(response);
212
+ t.true(response.result.length == 0);
213
+ });
214
+ (0, ava_1.default)("report find deposits filter by deposit id", async (t) => {
215
+ const response = await src_1.ReportingService.findDepositsPaged(1, 10)
216
+ .orderBy(src_1.DepositSortProperty.TimeCreated, src_1.SortDirection.Desc)
217
+ .withDepositId("DEP_2342423440")
218
+ .execute();
219
+ t.truthy(response);
220
+ t.true(response.result.length !== 0);
221
+ const randomDeposit = response.result[Math.round(Math.random() * (response.result.length - 1))];
222
+ t.truthy(randomDeposit);
223
+ t.true(randomDeposit instanceof src_1.DepositSummary);
224
+ t.true(startDate.getTime() <= new Date(randomDeposit.depositDate).getTime());
225
+ });
226
+ //# sourceMappingURL=ReportingDepositsTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReportingDepositsTest.js","sourceRoot":"","sources":["../../../../../test/Integration/Gateways/GpApiConnector/ReportingDepositsTest.ts"],"names":[],"mappings":";;;;;AAAA,8CAAuB;AACvB,yCAWyB;AACzB,mFAAgF;AAEhF,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,EAC1B,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;AACvB,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;AACnD,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AACtB,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACxB,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAExB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;AACvC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AACpB,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACtB,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAEtB,IAAI,cAAc,GAAmB,IAAI,oBAAc,EAAE,CAAC;AAE1D,aAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;IACrB,uBAAiB,CAAC,gBAAgB,CAChC,yCAAmB,CAAC,gBAAgB,CAAC,aAAO,CAAC,cAAc,CAAC,CAC7D,C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