@henrylabs-interview/payment-processor 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/resources/embedded.js +10 -8
- package/package.json +1 -1
|
@@ -33,21 +33,21 @@ export async function renderEmbeddedCheckout(containerElementId, checkoutId, cal
|
|
|
33
33
|
box-sizing: border-box;
|
|
34
34
|
">
|
|
35
35
|
<h3 style="margin:0 0 20px 0; font-size:18px; font-weight:600; color:#111827;">
|
|
36
|
-
Secure Checkout
|
|
36
|
+
"Secure" Checkout
|
|
37
37
|
</h3>
|
|
38
38
|
|
|
39
39
|
<div style="display:flex; flex-direction:column; gap:14px;">
|
|
40
40
|
|
|
41
|
-
${inputBlock('card-number', 'Card Number', '4242 4242 4242 4242')}
|
|
41
|
+
${inputBlock('card-number', 'Card Number', '4242 4242 4242 4242', 16)}
|
|
42
42
|
<div style="display:flex; gap:10px;">
|
|
43
43
|
<div style="flex:1;">
|
|
44
|
-
${inputBlock('exp-month', 'Exp. Month', '12')}
|
|
44
|
+
${inputBlock('exp-month', 'Exp. Month', '12', 2)}
|
|
45
45
|
</div>
|
|
46
46
|
<div style="flex:1;">
|
|
47
|
-
${inputBlock('exp-year', 'Exp. Year', '2030')}
|
|
47
|
+
${inputBlock('exp-year', 'Exp. Year', '2030', 4)}
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
|
-
${inputBlock('cvc', 'CVC', '123')}
|
|
50
|
+
${inputBlock('cvc', 'CVC', '123', 3)}
|
|
51
51
|
|
|
52
52
|
<button id="confirm-btn"
|
|
53
53
|
style="
|
|
@@ -73,7 +73,7 @@ export async function renderEmbeddedCheckout(containerElementId, checkoutId, cal
|
|
|
73
73
|
</div>
|
|
74
74
|
</div>
|
|
75
75
|
`;
|
|
76
|
-
function inputBlock(id, label, placeholder) {
|
|
76
|
+
function inputBlock(id, label, placeholder, maxLength) {
|
|
77
77
|
return `
|
|
78
78
|
<div style="display:flex; flex-direction:column;">
|
|
79
79
|
<label style="font-size:12px; color:#6b7280; margin-bottom:6px;">
|
|
@@ -81,9 +81,11 @@ export async function renderEmbeddedCheckout(containerElementId, checkoutId, cal
|
|
|
81
81
|
</label>
|
|
82
82
|
<input
|
|
83
83
|
id="${id}"
|
|
84
|
-
type="
|
|
84
|
+
type="text"
|
|
85
|
+
inputmode="numeric"
|
|
86
|
+
maxlength="${maxLength}"
|
|
87
|
+
pattern="[0-9]*"
|
|
85
88
|
placeholder="${placeholder}"
|
|
86
|
-
inputmode="numeric"
|
|
87
89
|
style="
|
|
88
90
|
padding:10px 12px;
|
|
89
91
|
border-radius:10px;
|