logix-payment-shift4 1.0.3 → 1.0.4

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 CHANGED
@@ -183,19 +183,28 @@ function _unsupportedIterableToArray(r, a) {
183
183
 
184
184
  function PaymentForm(_ref) {
185
185
  var amount = _ref.amount,
186
- currency = _ref.currency;
186
+ currency = _ref.currency,
187
+ currencyIcon = _ref.currencyIcon,
188
+ color = _ref.color,
189
+ _ref$formwidth = _ref.formwidth,
190
+ formwidth = _ref$formwidth === void 0 ? 400 : _ref$formwidth,
191
+ _ref$formborderRadius = _ref.formborderRadius,
192
+ formborderRadius = _ref$formborderRadius === void 0 ? 20 : _ref$formborderRadius,
193
+ _ref$formbackgroundCo = _ref.formbackgroundColor,
194
+ formbackgroundColor = _ref$formbackgroundCo === void 0 ? "#fff" : _ref$formbackgroundCo,
195
+ companyLogo = _ref.companyLogo;
187
196
  var formRef = React.useRef();
188
197
  var initializedRef = React.useRef(false); // yalnız bir dəfə mount üçün
189
198
  var shift4Ref = React.useRef(null);
190
199
  var componentsRef = React.useRef(null);
191
200
  var _useState = React.useState(""),
192
- _useState2 = _slicedToArray(_useState, 2),
193
- error = _useState2[0],
194
- setError = _useState2[1];
201
+ _useState2 = _slicedToArray(_useState, 2);
202
+ _useState2[0];
203
+ var setError = _useState2[1];
195
204
  var _useState3 = React.useState(""),
196
- _useState4 = _slicedToArray(_useState3, 2),
197
- success = _useState4[0],
198
- setSuccess = _useState4[1];
205
+ _useState4 = _slicedToArray(_useState3, 2);
206
+ _useState4[0];
207
+ var setSuccess = _useState4[1];
199
208
  var _useState5 = React.useState(false),
200
209
  _useState6 = _slicedToArray(_useState5, 2),
201
210
  isSubmitting = _useState6[0],
@@ -325,63 +334,75 @@ function PaymentForm(_ref) {
325
334
  style: {
326
335
  display: "flex",
327
336
  justifyContent: "center",
328
- alignItems: "center",
329
- minHeight: "100vh",
330
- backgroundColor: "#f0f2f5",
331
- // yumşaq fon
332
- padding: "20px"
337
+ width: "100%",
338
+ padding: "20px",
339
+ boxSizing: "border-box"
333
340
  }
334
- }, /*#__PURE__*/React.createElement("div", {
341
+ }, /*#__PURE__*/React.createElement("form", {
342
+ ref: formRef,
343
+ id: "payment-form",
344
+ onSubmit: handleSubmit,
345
+ method: "post",
335
346
  style: {
336
- width: "100%",
337
- maxWidth: "420px",
338
- // mobil üçün də uyğun
339
- padding: "30px",
340
- backgroundColor: "#ffffff",
341
- borderRadius: "12px",
342
- boxShadow: "0 6px 20px rgba(0,0,0,0.1)"
347
+ display: "grid",
348
+ gap: "12px",
349
+ padding: "24px",
350
+ backgroundColor: formbackgroundColor,
351
+ borderRadius: formborderRadius,
352
+ width: formwidth,
353
+ // səhifənin 1/4-ü
354
+ boxSizing: "border-box"
343
355
  }
344
- }, /*#__PURE__*/React.createElement("h2", {
356
+ }, /*#__PURE__*/React.createElement("div", {
345
357
  style: {
346
358
  textAlign: "center",
347
- marginBottom: "20px",
348
- color: "#333",
349
- fontWeight: "600"
359
+ marginBottom: 20
350
360
  }
351
- }, "Secure Payment"), /*#__PURE__*/React.createElement("div", {
352
- id: "payment-error",
353
- className: "alert alert-danger",
361
+ }, /*#__PURE__*/React.createElement("img", {
362
+ src: companyLogo,
363
+ alt: "Logo",
354
364
  style: {
355
- marginBottom: "15px",
356
- padding: "10px",
357
- backgroundColor: "#ffe5e5",
358
- color: "#a00",
359
- borderRadius: "6px",
360
- display: error ? "block" : "none"
361
- },
362
- role: "alert",
363
- "aria-live": "polite"
364
- }, error), /*#__PURE__*/React.createElement("div", {
365
- id: "payment-success",
366
- className: "alert alert-success",
365
+ height: "40px",
366
+ width: "auto",
367
+ marginBottom: 10
368
+ }
369
+ }), /*#__PURE__*/React.createElement("div", {
367
370
  style: {
368
- marginBottom: "15px",
369
- padding: "10px",
370
- backgroundColor: "#e7f6eb",
371
- color: "#1c7c3a",
372
- borderRadius: "6px",
373
- display: success ? "block" : "none"
374
- },
375
- role: "status",
376
- "aria-live": "polite"
377
- }, success), /*#__PURE__*/React.createElement("form", {
378
- ref: formRef,
379
- id: "payment-form",
380
- className: "grid gap-5",
381
- onSubmit: handleSubmit,
382
- method: "post"
371
+ display: "flex",
372
+ alignItems: "center",
373
+ gap: "12px",
374
+ marginTop: 10
375
+ }
383
376
  }, /*#__PURE__*/React.createElement("div", {
384
- className: "grid gap-2"
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
+ style: {
403
+ display: "grid",
404
+ gap: "8px"
405
+ }
385
406
  }, /*#__PURE__*/React.createElement("label", {
386
407
  style: {
387
408
  fontWeight: "500",
@@ -392,15 +413,16 @@ function PaymentForm(_ref) {
392
413
  className: "form-control",
393
414
  style: {
394
415
  padding: "12px",
395
- borderRadius: "6px",
396
- border: "1px solid #ccc"
416
+ borderRadius: "10px",
417
+ border: "1px solid #ccc",
418
+ boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
397
419
  }
398
420
  })), /*#__PURE__*/React.createElement("div", {
399
- className: "grid gap-2",
400
421
  style: {
401
- gridTemplateColumns: "1fr 1fr",
402
422
  display: "grid",
403
- gap: "10px"
423
+ gridTemplateColumns: "1fr 1fr",
424
+ gap: "10px",
425
+ marginTop: "12px"
404
426
  }
405
427
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("label", {
406
428
  style: {
@@ -412,8 +434,9 @@ function PaymentForm(_ref) {
412
434
  className: "form-control",
413
435
  style: {
414
436
  padding: "12px",
415
- borderRadius: "6px",
416
- border: "1px solid #ccc"
437
+ borderRadius: "10px",
438
+ border: "1px solid #ccc",
439
+ boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
417
440
  }
418
441
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("label", {
419
442
  style: {
@@ -425,25 +448,26 @@ function PaymentForm(_ref) {
425
448
  className: "form-control",
426
449
  style: {
427
450
  padding: "12px",
428
- borderRadius: "6px",
429
- border: "1px solid #ccc"
451
+ borderRadius: "10px",
452
+ border: "1px solid #ccc",
453
+ boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
430
454
  }
431
455
  }))), /*#__PURE__*/React.createElement("button", {
432
456
  type: "submit",
433
457
  disabled: !isReady || isSubmitting,
434
458
  style: {
459
+ marginTop: "16px",
435
460
  width: "100%",
436
461
  padding: "14px",
437
- backgroundColor: "#4f46e5",
462
+ backgroundColor: color,
438
463
  color: "white",
439
464
  border: "none",
440
- borderRadius: "8px",
465
+ borderRadius: "12px",
441
466
  fontWeight: "600",
442
- cursor: "pointer",
443
- opacity: !isReady || isSubmitting ? 0.7 : 1,
444
- marginTop: "10px"
467
+ cursor: !isReady || isSubmitting ? "not-allowed" : "pointer",
468
+ opacity: !isReady || isSubmitting ? 0.7 : 1
445
469
  }
446
- }, isSubmitting ? "Processing..." : "Buy now"))));
470
+ }, isSubmitting ? "Processing..." : "Buy now")));
447
471
  }
448
472
 
449
473
  exports.PaymentForm = PaymentForm;
package/dist/index.esm.js CHANGED
@@ -181,19 +181,28 @@ function _unsupportedIterableToArray(r, a) {
181
181
 
182
182
  function PaymentForm(_ref) {
183
183
  var amount = _ref.amount,
184
- currency = _ref.currency;
184
+ currency = _ref.currency,
185
+ currencyIcon = _ref.currencyIcon,
186
+ color = _ref.color,
187
+ _ref$formwidth = _ref.formwidth,
188
+ formwidth = _ref$formwidth === void 0 ? 400 : _ref$formwidth,
189
+ _ref$formborderRadius = _ref.formborderRadius,
190
+ formborderRadius = _ref$formborderRadius === void 0 ? 20 : _ref$formborderRadius,
191
+ _ref$formbackgroundCo = _ref.formbackgroundColor,
192
+ formbackgroundColor = _ref$formbackgroundCo === void 0 ? "#fff" : _ref$formbackgroundCo,
193
+ companyLogo = _ref.companyLogo;
185
194
  var formRef = useRef();
186
195
  var initializedRef = useRef(false); // yalnız bir dəfə mount üçün
187
196
  var shift4Ref = useRef(null);
188
197
  var componentsRef = useRef(null);
189
198
  var _useState = useState(""),
190
- _useState2 = _slicedToArray(_useState, 2),
191
- error = _useState2[0],
192
- setError = _useState2[1];
199
+ _useState2 = _slicedToArray(_useState, 2);
200
+ _useState2[0];
201
+ var setError = _useState2[1];
193
202
  var _useState3 = useState(""),
194
- _useState4 = _slicedToArray(_useState3, 2),
195
- success = _useState4[0],
196
- setSuccess = _useState4[1];
203
+ _useState4 = _slicedToArray(_useState3, 2);
204
+ _useState4[0];
205
+ var setSuccess = _useState4[1];
197
206
  var _useState5 = useState(false),
198
207
  _useState6 = _slicedToArray(_useState5, 2),
199
208
  isSubmitting = _useState6[0],
@@ -323,63 +332,75 @@ function PaymentForm(_ref) {
323
332
  style: {
324
333
  display: "flex",
325
334
  justifyContent: "center",
326
- alignItems: "center",
327
- minHeight: "100vh",
328
- backgroundColor: "#f0f2f5",
329
- // yumşaq fon
330
- padding: "20px"
335
+ width: "100%",
336
+ padding: "20px",
337
+ boxSizing: "border-box"
331
338
  }
332
- }, /*#__PURE__*/React.createElement("div", {
339
+ }, /*#__PURE__*/React.createElement("form", {
340
+ ref: formRef,
341
+ id: "payment-form",
342
+ onSubmit: handleSubmit,
343
+ method: "post",
333
344
  style: {
334
- width: "100%",
335
- maxWidth: "420px",
336
- // mobil üçün də uyğun
337
- padding: "30px",
338
- backgroundColor: "#ffffff",
339
- borderRadius: "12px",
340
- boxShadow: "0 6px 20px rgba(0,0,0,0.1)"
345
+ display: "grid",
346
+ gap: "12px",
347
+ padding: "24px",
348
+ backgroundColor: formbackgroundColor,
349
+ borderRadius: formborderRadius,
350
+ width: formwidth,
351
+ // səhifənin 1/4-ü
352
+ boxSizing: "border-box"
341
353
  }
342
- }, /*#__PURE__*/React.createElement("h2", {
354
+ }, /*#__PURE__*/React.createElement("div", {
343
355
  style: {
344
356
  textAlign: "center",
345
- marginBottom: "20px",
346
- color: "#333",
347
- fontWeight: "600"
357
+ marginBottom: 20
348
358
  }
349
- }, "Secure Payment"), /*#__PURE__*/React.createElement("div", {
350
- id: "payment-error",
351
- className: "alert alert-danger",
359
+ }, /*#__PURE__*/React.createElement("img", {
360
+ src: companyLogo,
361
+ alt: "Logo",
352
362
  style: {
353
- marginBottom: "15px",
354
- padding: "10px",
355
- backgroundColor: "#ffe5e5",
356
- color: "#a00",
357
- borderRadius: "6px",
358
- display: error ? "block" : "none"
359
- },
360
- role: "alert",
361
- "aria-live": "polite"
362
- }, error), /*#__PURE__*/React.createElement("div", {
363
- id: "payment-success",
364
- className: "alert alert-success",
363
+ height: "40px",
364
+ width: "auto",
365
+ marginBottom: 10
366
+ }
367
+ }), /*#__PURE__*/React.createElement("div", {
365
368
  style: {
366
- marginBottom: "15px",
367
- padding: "10px",
368
- backgroundColor: "#e7f6eb",
369
- color: "#1c7c3a",
370
- borderRadius: "6px",
371
- display: success ? "block" : "none"
372
- },
373
- role: "status",
374
- "aria-live": "polite"
375
- }, success), /*#__PURE__*/React.createElement("form", {
376
- ref: formRef,
377
- id: "payment-form",
378
- className: "grid gap-5",
379
- onSubmit: handleSubmit,
380
- method: "post"
369
+ display: "flex",
370
+ alignItems: "center",
371
+ gap: "12px",
372
+ marginTop: 10
373
+ }
381
374
  }, /*#__PURE__*/React.createElement("div", {
382
- className: "grid gap-2"
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
+ style: {
401
+ display: "grid",
402
+ gap: "8px"
403
+ }
383
404
  }, /*#__PURE__*/React.createElement("label", {
384
405
  style: {
385
406
  fontWeight: "500",
@@ -390,15 +411,16 @@ function PaymentForm(_ref) {
390
411
  className: "form-control",
391
412
  style: {
392
413
  padding: "12px",
393
- borderRadius: "6px",
394
- border: "1px solid #ccc"
414
+ borderRadius: "10px",
415
+ border: "1px solid #ccc",
416
+ boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
395
417
  }
396
418
  })), /*#__PURE__*/React.createElement("div", {
397
- className: "grid gap-2",
398
419
  style: {
399
- gridTemplateColumns: "1fr 1fr",
400
420
  display: "grid",
401
- gap: "10px"
421
+ gridTemplateColumns: "1fr 1fr",
422
+ gap: "10px",
423
+ marginTop: "12px"
402
424
  }
403
425
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("label", {
404
426
  style: {
@@ -410,8 +432,9 @@ function PaymentForm(_ref) {
410
432
  className: "form-control",
411
433
  style: {
412
434
  padding: "12px",
413
- borderRadius: "6px",
414
- border: "1px solid #ccc"
435
+ borderRadius: "10px",
436
+ border: "1px solid #ccc",
437
+ boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
415
438
  }
416
439
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("label", {
417
440
  style: {
@@ -423,25 +446,26 @@ function PaymentForm(_ref) {
423
446
  className: "form-control",
424
447
  style: {
425
448
  padding: "12px",
426
- borderRadius: "6px",
427
- border: "1px solid #ccc"
449
+ borderRadius: "10px",
450
+ border: "1px solid #ccc",
451
+ boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
428
452
  }
429
453
  }))), /*#__PURE__*/React.createElement("button", {
430
454
  type: "submit",
431
455
  disabled: !isReady || isSubmitting,
432
456
  style: {
457
+ marginTop: "16px",
433
458
  width: "100%",
434
459
  padding: "14px",
435
- backgroundColor: "#4f46e5",
460
+ backgroundColor: color,
436
461
  color: "white",
437
462
  border: "none",
438
- borderRadius: "8px",
463
+ borderRadius: "12px",
439
464
  fontWeight: "600",
440
- cursor: "pointer",
441
- opacity: !isReady || isSubmitting ? 0.7 : 1,
442
- marginTop: "10px"
465
+ cursor: !isReady || isSubmitting ? "not-allowed" : "pointer",
466
+ opacity: !isReady || isSubmitting ? 0.7 : 1
443
467
  }
444
- }, isSubmitting ? "Processing..." : "Buy now"))));
468
+ }, isSubmitting ? "Processing..." : "Buy now")));
445
469
  }
446
470
 
447
471
  export { PaymentForm };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "logix-payment-shift4",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "description": "A React component library for integrating Shift4 payments with Logix applications.",
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef, useState } from "react";
2
2
 
3
- export default function PaymentForm({amount,currency}) {
3
+ export default function PaymentForm({amount,currency,currencyIcon,color,formwidth=400,formborderRadius=20,formbackgroundColor="#fff",companyLogo}) {
4
4
  const formRef = useRef();
5
5
  const initializedRef = useRef(false); // yalnız bir dəfə mount üçün
6
6
  const shift4Ref = useRef(null);
@@ -90,105 +90,117 @@ export default function PaymentForm({amount,currency}) {
90
90
  };
91
91
 
92
92
  return (
93
- <div
93
+ <div
94
94
  style={{
95
95
  display: "flex",
96
96
  justifyContent: "center",
97
- alignItems: "center",
98
- minHeight: "100vh",
99
- backgroundColor: "#f0f2f5", // yumşaq fon
97
+ width: "100%",
100
98
  padding: "20px",
99
+ boxSizing: "border-box"
101
100
  }}
102
101
  >
103
- <div
102
+ <form
103
+ ref={formRef}
104
+ id="payment-form"
105
+ onSubmit={handleSubmit}
106
+ method="post"
104
107
  style={{
105
- width: "100%",
106
- maxWidth: "420px", // mobil üçün də uyğun
107
- padding: "30px",
108
- backgroundColor: "#ffffff",
109
- borderRadius: "12px",
110
- boxShadow: "0 6px 20px rgba(0,0,0,0.1)",
108
+ display: "grid",
109
+ gap: "12px",
110
+ padding: "24px",
111
+ backgroundColor: formbackgroundColor,
112
+ borderRadius: formborderRadius,
113
+ width: formwidth, // səhifənin 1/4-ü
114
+ boxSizing: "border-box"
111
115
  }}
112
116
  >
113
- <h2 style={{ textAlign: "center", marginBottom: "20px", color: "#333", fontWeight: "600" }}>
114
- Secure Payment
115
- </h2>
116
-
117
- <div
118
- id="payment-error"
119
- className="alert alert-danger"
120
- style={{
121
- marginBottom: "15px",
122
- padding: "10px",
123
- backgroundColor: "#ffe5e5",
124
- color: "#a00",
125
- borderRadius: "6px",
126
- display: error ? "block" : "none",
127
- }}
128
- role="alert"
129
- aria-live="polite"
130
- >
131
- {error}
117
+ {/* Logo + Total */}
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>
132
136
  </div>
133
137
 
134
- <div
135
- id="payment-success"
136
- className="alert alert-success"
137
- style={{
138
- marginBottom: "15px",
139
- padding: "10px",
140
- backgroundColor: "#e7f6eb",
141
- color: "#1c7c3a",
142
- borderRadius: "6px",
143
- display: success ? "block" : "none",
144
- }}
145
- role="status"
146
- aria-live="polite"
147
- >
148
- {success}
138
+ {/* Card Number */}
139
+ <div style={{ display: "grid", gap: "8px" }}>
140
+ <label style={{ fontWeight: "500", color: "#555" }}>Card number</label>
141
+ <div
142
+ data-shift4="number"
143
+ className="form-control"
144
+ style={{
145
+ padding: "12px",
146
+ borderRadius: "10px",
147
+ border: "1px solid #ccc",
148
+ boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
149
+ }}
150
+ />
149
151
  </div>
150
152
 
151
- <form ref={formRef} id="payment-form" className="grid gap-5" onSubmit={handleSubmit} method="post">
152
- {/* Card Number */}
153
- <div className="grid gap-2">
154
- <label style={{ fontWeight: "500", color: "#555" }}>Card number</label>
155
- <div data-shift4="number" className="form-control" style={{ padding: "12px", borderRadius: "6px", border: "1px solid #ccc" }}></div>
153
+ {/* Expiration + CVC */}
154
+ <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: "10px", marginTop: "12px" }}>
155
+ <div>
156
+ <label style={{ fontWeight: "500", color: "#555" }}>Expiration</label>
157
+ <div
158
+ data-shift4="expiry"
159
+ className="form-control"
160
+ style={{
161
+ padding: "12px",
162
+ borderRadius: "10px",
163
+ border: "1px solid #ccc",
164
+ boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
165
+ }}
166
+ />
156
167
  </div>
157
-
158
- {/* Expiration + CVC */}
159
- <div className="grid gap-2" style={{ gridTemplateColumns: "1fr 1fr", display: "grid", gap: "10px" }}>
160
- <div>
161
- <label style={{ fontWeight: "500", color: "#555" }}>Expiration</label>
162
- <div data-shift4="expiry" className="form-control" style={{ padding: "12px", borderRadius: "6px", border: "1px solid #ccc" }}></div>
163
- </div>
164
-
165
- <div>
166
- <label style={{ fontWeight: "500", color: "#555" }}>CVC</label>
167
- <div data-shift4="cvc" className="form-control" style={{ padding: "12px", borderRadius: "6px", border: "1px solid #ccc" }}></div>
168
- </div>
168
+ <div>
169
+ <label style={{ fontWeight: "500", color: "#555" }}>CVC</label>
170
+ <div
171
+ data-shift4="cvc"
172
+ className="form-control"
173
+ style={{
174
+ padding: "12px",
175
+ borderRadius: "10px",
176
+ border: "1px solid #ccc",
177
+ boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
178
+ }}
179
+ />
169
180
  </div>
181
+ </div>
170
182
 
171
- {/* Submit Button */}
172
- <button
173
- type="submit"
174
- disabled={!isReady || isSubmitting}
175
- style={{
176
- width: "100%",
177
- padding: "14px",
178
- backgroundColor: "#4f46e5",
179
- color: "white",
180
- border: "none",
181
- borderRadius: "8px",
182
- fontWeight: "600",
183
- cursor: "pointer",
184
- opacity: !isReady || isSubmitting ? 0.7 : 1,
185
- marginTop: "10px",
186
- }}
187
- >
188
- {isSubmitting ? "Processing..." : "Buy now"}
189
- </button>
190
- </form>
191
- </div>
183
+ {/* Submit Button */}
184
+ <button
185
+ type="submit"
186
+ disabled={!isReady || isSubmitting}
187
+ style={{
188
+ marginTop: "16px",
189
+ width: "100%",
190
+ padding: "14px",
191
+ backgroundColor: color,
192
+ color: "white",
193
+ border: "none",
194
+ borderRadius: "12px",
195
+ fontWeight: "600",
196
+ cursor: !isReady || isSubmitting ? "not-allowed" : "pointer",
197
+ opacity: !isReady || isSubmitting ? 0.7 : 1
198
+ }}
199
+ >
200
+ {isSubmitting ? "Processing..." : "Buy now"}
201
+ </button>
202
+ </form>
192
203
  </div>
204
+
193
205
  );
194
206
  }