@fat-zebra/sdk 1.5.1 → 1.5.2

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 (148) hide show
  1. package/.idea/fatzebra-js.iml +12 -0
  2. package/.idea/modules.xml +8 -0
  3. package/.idea/vcs.xml +6 -0
  4. package/README.dev.md +33 -0
  5. package/README.md +4 -1
  6. package/dist/fatzebra.css +91 -0
  7. package/dist/local/fatzebra.js +18990 -0
  8. package/dist/local/fatzebra.js.map +1 -1
  9. package/dist/production/fatzebra.css +91 -0
  10. package/dist/production/fatzebra.js +2 -0
  11. package/dist/sca/cardinal.js +1 -2
  12. package/dist/sca/index.js +0 -1
  13. package/dist/shared/util.d.ts +1 -1
  14. package/dist/shared/util.js +2 -2
  15. package/dist/staging/fatzebra.css +91 -0
  16. package/dist/staging/fatzebra.js +17717 -0
  17. package/dist/staging/fatzebra.js.map +1 -0
  18. package/dist/staging/index.html +247 -0
  19. package/dist/version.d.ts +1 -0
  20. package/dist/version.js +1 -0
  21. package/package.json +7 -6
  22. package/scripts/release-package.js +113 -0
  23. package/dist/react/url.d.ts +0 -12
  24. package/dist/react/url.js +0 -33
  25. package/dist/src/applepay/applepay.js +0 -198
  26. package/dist/src/applepay/applepay.js.map +0 -1
  27. package/dist/src/applepay/clients/apple-pay-client.js +0 -66
  28. package/dist/src/applepay/clients/apple-pay-client.js.map +0 -1
  29. package/dist/src/applepay/clients/paynow-client.js +0 -96
  30. package/dist/src/applepay/clients/paynow-client.js.map +0 -1
  31. package/dist/src/applepay/index.js +0 -6
  32. package/dist/src/applepay/index.js.map +0 -1
  33. package/dist/src/click_to_pay/index.js +0 -88
  34. package/dist/src/click_to_pay/index.js.map +0 -1
  35. package/dist/src/click_to_pay/types.js +0 -3
  36. package/dist/src/click_to_pay/types.js.map +0 -1
  37. package/dist/src/hpp/hpp.js +0 -230
  38. package/dist/src/hpp/hpp.js.map +0 -1
  39. package/dist/src/hpp/hpp.test.js +0 -135
  40. package/dist/src/hpp/hpp.test.js.map +0 -1
  41. package/dist/src/hpp/index.js +0 -6
  42. package/dist/src/hpp/index.js.map +0 -1
  43. package/dist/src/index.js +0 -14
  44. package/dist/src/index.js.map +0 -1
  45. package/dist/src/main.js +0 -243
  46. package/dist/src/main.js.map +0 -1
  47. package/dist/src/main.test.js +0 -236
  48. package/dist/src/main.test.js.map +0 -1
  49. package/dist/src/paypal/paypal-button.js +0 -311
  50. package/dist/src/paypal/paypal-button.js.map +0 -1
  51. package/dist/src/paypal/paypal-button.test.js +0 -41
  52. package/dist/src/paypal/paypal-button.test.js.map +0 -1
  53. package/dist/src/paypal/paypal-checkout.js +0 -111
  54. package/dist/src/paypal/paypal-checkout.js.map +0 -1
  55. package/dist/src/paypal/paypal-checkout.test.js +0 -167
  56. package/dist/src/paypal/paypal-checkout.test.js.map +0 -1
  57. package/dist/src/paypal/types.js +0 -9
  58. package/dist/src/paypal/types.js.map +0 -1
  59. package/dist/src/paypal/validation.js +0 -73
  60. package/dist/src/paypal/validation.js.map +0 -1
  61. package/dist/src/react/VerifyCard.js +0 -29
  62. package/dist/src/react/VerifyCard.js.map +0 -1
  63. package/dist/src/react/index.js +0 -11
  64. package/dist/src/react/index.js.map +0 -1
  65. package/dist/src/react/submitForm.js +0 -13
  66. package/dist/src/react/submitForm.js.map +0 -1
  67. package/dist/src/react/url.js +0 -60
  68. package/dist/src/react/url.js.map +0 -1
  69. package/dist/src/react/url.test.js +0 -88
  70. package/dist/src/react/url.test.js.map +0 -1
  71. package/dist/src/react/useFatZebra.js +0 -119
  72. package/dist/src/react/useFatZebra.js.map +0 -1
  73. package/dist/src/sca/cardinal.js +0 -110
  74. package/dist/src/sca/cardinal.js.map +0 -1
  75. package/dist/src/sca/eci-mappings.js +0 -63
  76. package/dist/src/sca/eci-mappings.js.map +0 -1
  77. package/dist/src/sca/eci-mappings.test.js +0 -31
  78. package/dist/src/sca/eci-mappings.test.js.map +0 -1
  79. package/dist/src/sca/index.js +0 -363
  80. package/dist/src/sca/index.js.map +0 -1
  81. package/dist/src/sca/index.test.js +0 -620
  82. package/dist/src/sca/index.test.js.map +0 -1
  83. package/dist/src/sca/scenarios/enrollment.js +0 -161
  84. package/dist/src/sca/scenarios/enrollment.js.map +0 -1
  85. package/dist/src/sca/scenarios/index.js +0 -8
  86. package/dist/src/sca/scenarios/index.js.map +0 -1
  87. package/dist/src/sca/scenarios/validation.js +0 -139
  88. package/dist/src/sca/scenarios/validation.js.map +0 -1
  89. package/dist/src/sca/types.js +0 -57
  90. package/dist/src/sca/types.js.map +0 -1
  91. package/dist/src/shared/api-gateway-client.js +0 -184
  92. package/dist/src/shared/api-gateway-client.js.map +0 -1
  93. package/dist/src/shared/bridge-client.js +0 -24
  94. package/dist/src/shared/bridge-client.js.map +0 -1
  95. package/dist/src/shared/constants.js +0 -19
  96. package/dist/src/shared/constants.js.map +0 -1
  97. package/dist/src/shared/env.development.js +0 -12
  98. package/dist/src/shared/env.development.js.map +0 -1
  99. package/dist/src/shared/env.js +0 -46
  100. package/dist/src/shared/env.js.map +0 -1
  101. package/dist/src/shared/envs/local.js +0 -12
  102. package/dist/src/shared/envs/local.js.map +0 -1
  103. package/dist/src/shared/envs/production.js +0 -12
  104. package/dist/src/shared/envs/production.js.map +0 -1
  105. package/dist/src/shared/envs/sandbox.js +0 -12
  106. package/dist/src/shared/envs/sandbox.js.map +0 -1
  107. package/dist/src/shared/envs/staging.js +0 -12
  108. package/dist/src/shared/envs/staging.js.map +0 -1
  109. package/dist/src/shared/event-manager.js +0 -14
  110. package/dist/src/shared/event-manager.js.map +0 -1
  111. package/dist/src/shared/post-message-client.js +0 -107
  112. package/dist/src/shared/post-message-client.js.map +0 -1
  113. package/dist/src/shared/post-message-client.test.js +0 -58
  114. package/dist/src/shared/post-message-client.test.js.map +0 -1
  115. package/dist/src/shared/types.js +0 -47
  116. package/dist/src/shared/types.js.map +0 -1
  117. package/dist/src/shared/types.test.js +0 -55
  118. package/dist/src/shared/types.test.js.map +0 -1
  119. package/dist/src/shared/util.js +0 -96
  120. package/dist/src/shared/util.js.map +0 -1
  121. package/dist/src/shared/util.test.js +0 -148
  122. package/dist/src/shared/util.test.js.map +0 -1
  123. package/dist/src/validation/index.js +0 -12
  124. package/dist/src/validation/index.js.map +0 -1
  125. package/dist/src/validation/schemas/click-to-pay/load-params.json +0 -34
  126. package/dist/src/validation/schemas/click-to-pay/options.json +0 -23
  127. package/dist/src/validation/schemas/click-to-pay/payment-intent.json +0 -42
  128. package/dist/src/validation/schemas/customer.json +0 -38
  129. package/dist/src/validation/schemas/hpp-load-params.json +0 -40
  130. package/dist/src/validation/schemas/hpp-options.json +0 -48
  131. package/dist/src/validation/schemas/payment-intent.json +0 -48
  132. package/dist/src/validation/schemas/payment-method.json +0 -83
  133. package/dist/src/validation/schemas/verify-card-options.json +0 -15
  134. package/dist/src/validation/schemas/verify-card-params.json +0 -24
  135. package/dist/src/validation/validation-helper.js +0 -10
  136. package/dist/src/validation/validation-helper.js.map +0 -1
  137. package/dist/src/validation/validation-helper.test.js +0 -34
  138. package/dist/src/validation/validation-helper.test.js.map +0 -1
  139. package/dist/src/validation/validators/click-to-pay-load-params-validator.js +0 -19
  140. package/dist/src/validation/validators/click-to-pay-load-params-validator.js.map +0 -1
  141. package/dist/src/validation/validators/hpp-load-params-validator.js +0 -21
  142. package/dist/src/validation/validators/hpp-load-params-validator.js.map +0 -1
  143. package/dist/src/validation/validators/hpp-load-params-validator.test.js +0 -56
  144. package/dist/src/validation/validators/hpp-load-params-validator.test.js.map +0 -1
  145. package/dist/src/validation/validators/verify-card-params-validator.js +0 -23
  146. package/dist/src/validation/validators/verify-card-params-validator.js.map +0 -1
  147. package/dist/tests/helpers/api-gateway-mock.js +0 -37
  148. package/dist/tests/helpers/api-gateway-mock.js.map +0 -1
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="WEB_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/temp" />
6
+ <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
+ <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
+ </content>
9
+ <orderEntry type="inheritedJdk" />
10
+ <orderEntry type="sourceFolder" forTests="false" />
11
+ </component>
12
+ </module>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/fatzebra-js.iml" filepath="$PROJECT_DIR$/.idea/fatzebra-js.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
package/README.dev.md CHANGED
@@ -130,6 +130,39 @@ The deployed SDKs are available from the following URLs.
130
130
  * Sandbox: https://cdn.pmnts-sandbox.io/sdk/v1/fatzebra.js
131
131
  * Production: https://cdn.pmnts.io/sdk/v1/fatzebra.js
132
132
 
133
+ ## Release react npm package
134
+
135
+ Prerequisite: it is essential that you have been added to the https://www.npmjs.com/ group account.
136
+
137
+ To release the react npm package
138
+
139
+ ```
140
+ git checkout master
141
+ git pull
142
+ ```
143
+
144
+ then run
145
+
146
+ ```
147
+ npm run npm:publish
148
+ ```
149
+
150
+ You will be prompted with:
151
+
152
+ ```
153
+ enter (y) for minor release or (n) for patch release
154
+ ```
155
+
156
+ if it is a major release i.e. a breaking change please update the script/consult with management as major release would indicate a breaking change.
157
+
158
+ You will then see the project build and finally be prompted to:
159
+ ```
160
+ Press ENTER to open in the browser...
161
+ ```
162
+
163
+ from here enter your 2FA code and voila! You have published a new version of the SDK. Go tell some merchants.
164
+
165
+
133
166
  ## Release Management
134
167
 
135
168
  The release of the sdk follows a weekly schedule. In the beginning of a new release cycle, do the following
package/README.md CHANGED
@@ -1 +1,4 @@
1
- # Fat Zebra SDK
1
+ # Fat Zebra SDK
2
+
3
+ ## Change log
4
+ Monday 8th - updated the package to consume version from a version.ts file, rather than from package.json.
@@ -0,0 +1,91 @@
1
+ .checkout-button-wrapper {
2
+ display: flex;
3
+ justify-content: center;
4
+ align-items: center;
5
+ height: 200px;
6
+ }
7
+
8
+ .iframe-checkout {
9
+ flex: 1;
10
+ border: none;
11
+ width: 100%;
12
+ height: 100%;
13
+ min-height: 0;
14
+ overflow: auto;
15
+ -webkit-overflow-scrolling: touch;
16
+ }
17
+
18
+ .iframe-foreground,
19
+ .iframe-background {
20
+ top: 0;
21
+ left: 0;
22
+ right: 0;
23
+ bottom: 0;
24
+ flex-direction: column;
25
+ }
26
+
27
+ .iframe-foreground,
28
+ .iframe-background {
29
+ position: fixed;
30
+ }
31
+
32
+ .iframe-foreground {
33
+ z-index: -1;
34
+ }
35
+
36
+ .iframe-background {
37
+ background: rgba(0, 0, 0, 0.5);
38
+ }
39
+
40
+ .iframe-foreground {
41
+ flex-grow: 1;
42
+ top: auto;
43
+ width: 100%;
44
+ max-width: 480px;
45
+ height: 80vh;
46
+ background-color: #ffffff;
47
+ border-radius: 25px 25px 0 0;
48
+ }
49
+
50
+ .slide-in .iframe-foreground {
51
+ transform: translateY(100vh);
52
+ transition: transform 0.4s ease, z-index 0.3s ease 0.4s;
53
+ z-index: -1;
54
+ }
55
+
56
+ .slide-in .iframe-background {
57
+ opacity: 0;
58
+ z-index: -1;
59
+ transition: opacity 0.3s ease, z-index 0.3s ease 0.3s;
60
+ }
61
+
62
+ .slide-in.show .iframe-foreground {
63
+ transform: none;
64
+ transition: transform 0.4s ease;
65
+ z-index: 100;
66
+ }
67
+
68
+ .slide-in.show .iframe-background {
69
+ opacity: 1;
70
+ z-index: 0;
71
+ transition: opacity 0.3s ease;
72
+ }
73
+
74
+ @media only screen and (min-width: 480px) {
75
+ .iframe-foreground {
76
+ margin: 0 auto;
77
+ }
78
+ }
79
+
80
+ @media only screen and (min-width: 768px) {
81
+ .iframe-foreground {
82
+ margin: 0;
83
+ width: 400px;
84
+ height: 100vh;
85
+ left: 0;
86
+ }
87
+
88
+ .slide-in .iframe-foreground {
89
+ transform: translateX(-400px);
90
+ }
91
+ }