logix-payment-shift4 1.0.4 → 1.0.5
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/index.cjs.js +5 -51
- package/dist/index.esm.js +5 -51
- package/package.json +1 -1
- package/src/PaymentForm.jsx +2 -21
package/dist/index.cjs.js
CHANGED
|
@@ -183,16 +183,16 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
183
183
|
|
|
184
184
|
function PaymentForm(_ref) {
|
|
185
185
|
var amount = _ref.amount,
|
|
186
|
-
currency = _ref.currency
|
|
187
|
-
|
|
188
|
-
color = _ref.color,
|
|
186
|
+
currency = _ref.currency;
|
|
187
|
+
_ref.currencyIcon;
|
|
188
|
+
var color = _ref.color,
|
|
189
189
|
_ref$formwidth = _ref.formwidth,
|
|
190
190
|
formwidth = _ref$formwidth === void 0 ? 400 : _ref$formwidth,
|
|
191
191
|
_ref$formborderRadius = _ref.formborderRadius,
|
|
192
192
|
formborderRadius = _ref$formborderRadius === void 0 ? 20 : _ref$formborderRadius,
|
|
193
193
|
_ref$formbackgroundCo = _ref.formbackgroundColor,
|
|
194
|
-
formbackgroundColor = _ref$formbackgroundCo === void 0 ? "#fff" : _ref$formbackgroundCo
|
|
195
|
-
|
|
194
|
+
formbackgroundColor = _ref$formbackgroundCo === void 0 ? "#fff" : _ref$formbackgroundCo;
|
|
195
|
+
_ref.companyLogo;
|
|
196
196
|
var formRef = React.useRef();
|
|
197
197
|
var initializedRef = React.useRef(false); // yalnız bir dəfə mount üçün
|
|
198
198
|
var shift4Ref = React.useRef(null);
|
|
@@ -350,55 +350,9 @@ function PaymentForm(_ref) {
|
|
|
350
350
|
backgroundColor: formbackgroundColor,
|
|
351
351
|
borderRadius: formborderRadius,
|
|
352
352
|
width: formwidth,
|
|
353
|
-
// səhifənin 1/4-ü
|
|
354
353
|
boxSizing: "border-box"
|
|
355
354
|
}
|
|
356
355
|
}, /*#__PURE__*/React.createElement("div", {
|
|
357
|
-
style: {
|
|
358
|
-
textAlign: "center",
|
|
359
|
-
marginBottom: 20
|
|
360
|
-
}
|
|
361
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
362
|
-
src: companyLogo,
|
|
363
|
-
alt: "Logo",
|
|
364
|
-
style: {
|
|
365
|
-
height: "40px",
|
|
366
|
-
width: "auto",
|
|
367
|
-
marginBottom: 10
|
|
368
|
-
}
|
|
369
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
370
|
-
style: {
|
|
371
|
-
display: "flex",
|
|
372
|
-
alignItems: "center",
|
|
373
|
-
gap: "12px",
|
|
374
|
-
marginTop: 10
|
|
375
|
-
}
|
|
376
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
377
|
-
style: {
|
|
378
|
-
flex: 1,
|
|
379
|
-
height: "1px",
|
|
380
|
-
backgroundColor: "#e5e7eb"
|
|
381
|
-
}
|
|
382
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
383
|
-
style: {
|
|
384
|
-
fontSize: "22px",
|
|
385
|
-
fontWeight: "700",
|
|
386
|
-
color: "#1f2937",
|
|
387
|
-
margin: "0 12px"
|
|
388
|
-
}
|
|
389
|
-
}, "Total Amount:"), /*#__PURE__*/React.createElement("div", {
|
|
390
|
-
style: {
|
|
391
|
-
fontSize: "22px",
|
|
392
|
-
fontWeight: "700",
|
|
393
|
-
color: "#16a34a"
|
|
394
|
-
}
|
|
395
|
-
}, currencyIcon, " ", Math.round(amount * 100)), /*#__PURE__*/React.createElement("div", {
|
|
396
|
-
style: {
|
|
397
|
-
flex: 1,
|
|
398
|
-
height: "1px",
|
|
399
|
-
backgroundColor: "#e5e7eb"
|
|
400
|
-
}
|
|
401
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
402
356
|
style: {
|
|
403
357
|
display: "grid",
|
|
404
358
|
gap: "8px"
|
package/dist/index.esm.js
CHANGED
|
@@ -181,16 +181,16 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
181
181
|
|
|
182
182
|
function PaymentForm(_ref) {
|
|
183
183
|
var amount = _ref.amount,
|
|
184
|
-
currency = _ref.currency
|
|
185
|
-
|
|
186
|
-
color = _ref.color,
|
|
184
|
+
currency = _ref.currency;
|
|
185
|
+
_ref.currencyIcon;
|
|
186
|
+
var color = _ref.color,
|
|
187
187
|
_ref$formwidth = _ref.formwidth,
|
|
188
188
|
formwidth = _ref$formwidth === void 0 ? 400 : _ref$formwidth,
|
|
189
189
|
_ref$formborderRadius = _ref.formborderRadius,
|
|
190
190
|
formborderRadius = _ref$formborderRadius === void 0 ? 20 : _ref$formborderRadius,
|
|
191
191
|
_ref$formbackgroundCo = _ref.formbackgroundColor,
|
|
192
|
-
formbackgroundColor = _ref$formbackgroundCo === void 0 ? "#fff" : _ref$formbackgroundCo
|
|
193
|
-
|
|
192
|
+
formbackgroundColor = _ref$formbackgroundCo === void 0 ? "#fff" : _ref$formbackgroundCo;
|
|
193
|
+
_ref.companyLogo;
|
|
194
194
|
var formRef = useRef();
|
|
195
195
|
var initializedRef = useRef(false); // yalnız bir dəfə mount üçün
|
|
196
196
|
var shift4Ref = useRef(null);
|
|
@@ -348,55 +348,9 @@ function PaymentForm(_ref) {
|
|
|
348
348
|
backgroundColor: formbackgroundColor,
|
|
349
349
|
borderRadius: formborderRadius,
|
|
350
350
|
width: formwidth,
|
|
351
|
-
// səhifənin 1/4-ü
|
|
352
351
|
boxSizing: "border-box"
|
|
353
352
|
}
|
|
354
353
|
}, /*#__PURE__*/React.createElement("div", {
|
|
355
|
-
style: {
|
|
356
|
-
textAlign: "center",
|
|
357
|
-
marginBottom: 20
|
|
358
|
-
}
|
|
359
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
360
|
-
src: companyLogo,
|
|
361
|
-
alt: "Logo",
|
|
362
|
-
style: {
|
|
363
|
-
height: "40px",
|
|
364
|
-
width: "auto",
|
|
365
|
-
marginBottom: 10
|
|
366
|
-
}
|
|
367
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
368
|
-
style: {
|
|
369
|
-
display: "flex",
|
|
370
|
-
alignItems: "center",
|
|
371
|
-
gap: "12px",
|
|
372
|
-
marginTop: 10
|
|
373
|
-
}
|
|
374
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
375
|
-
style: {
|
|
376
|
-
flex: 1,
|
|
377
|
-
height: "1px",
|
|
378
|
-
backgroundColor: "#e5e7eb"
|
|
379
|
-
}
|
|
380
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
381
|
-
style: {
|
|
382
|
-
fontSize: "22px",
|
|
383
|
-
fontWeight: "700",
|
|
384
|
-
color: "#1f2937",
|
|
385
|
-
margin: "0 12px"
|
|
386
|
-
}
|
|
387
|
-
}, "Total Amount:"), /*#__PURE__*/React.createElement("div", {
|
|
388
|
-
style: {
|
|
389
|
-
fontSize: "22px",
|
|
390
|
-
fontWeight: "700",
|
|
391
|
-
color: "#16a34a"
|
|
392
|
-
}
|
|
393
|
-
}, currencyIcon, " ", Math.round(amount * 100)), /*#__PURE__*/React.createElement("div", {
|
|
394
|
-
style: {
|
|
395
|
-
flex: 1,
|
|
396
|
-
height: "1px",
|
|
397
|
-
backgroundColor: "#e5e7eb"
|
|
398
|
-
}
|
|
399
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
400
354
|
style: {
|
|
401
355
|
display: "grid",
|
|
402
356
|
gap: "8px"
|
package/package.json
CHANGED
package/src/PaymentForm.jsx
CHANGED
|
@@ -110,30 +110,11 @@ export default function PaymentForm({amount,currency,currencyIcon,color,formwidt
|
|
|
110
110
|
padding: "24px",
|
|
111
111
|
backgroundColor: formbackgroundColor,
|
|
112
112
|
borderRadius: formborderRadius,
|
|
113
|
-
width: formwidth,
|
|
113
|
+
width: formwidth,
|
|
114
114
|
boxSizing: "border-box"
|
|
115
115
|
}}
|
|
116
116
|
>
|
|
117
|
-
|
|
118
|
-
<div style={{ textAlign: "center", marginBottom: 20 }}>
|
|
119
|
-
<img
|
|
120
|
-
src={companyLogo}
|
|
121
|
-
alt="Logo"
|
|
122
|
-
style={{ height: "40px", width: "auto", marginBottom: 10 }}
|
|
123
|
-
/>
|
|
124
|
-
|
|
125
|
-
{/* Product Name + Price inline with line */}
|
|
126
|
-
<div style={{ display: "flex", alignItems: "center", gap: "12px", marginTop: 10 }}>
|
|
127
|
-
<div style={{ flex: 1, height: "1px", backgroundColor: "#e5e7eb" }} />
|
|
128
|
-
<div style={{ fontSize: "22px", fontWeight: "700", color: "#1f2937", margin: "0 12px" }}>
|
|
129
|
-
Total Amount:
|
|
130
|
-
</div>
|
|
131
|
-
<div style={{ fontSize: "22px", fontWeight: "700", color: "#16a34a" }}>
|
|
132
|
-
{currencyIcon} {Math.round(amount * 100)}
|
|
133
|
-
</div>
|
|
134
|
-
<div style={{ flex: 1, height: "1px", backgroundColor: "#e5e7eb" }} />
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
117
|
+
|
|
137
118
|
|
|
138
119
|
{/* Card Number */}
|
|
139
120
|
<div style={{ display: "grid", gap: "8px" }}>
|