@fractalpay/fractalpay-next-dev 0.0.235 → 0.0.237

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.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- interface Props$7 {
3
+ interface Props$8 {
4
4
  merchantPublicKey: string;
5
5
  customerId?: string;
6
6
  orderID?: string;
@@ -18,9 +18,9 @@ interface Props$7 {
18
18
  sessionToken?: string;
19
19
  showSurcharge?: number;
20
20
  }
21
- declare function RequestPayment(props: Props$7): React.JSX.Element;
21
+ declare function RequestPayment(props: Props$8): React.JSX.Element;
22
22
 
23
- interface Props$6 {
23
+ interface Props$7 {
24
24
  merchantPublicKey: string;
25
25
  customerId?: string;
26
26
  orderID?: string;
@@ -36,9 +36,9 @@ interface Props$6 {
36
36
  require_3ds?: boolean;
37
37
  sessionToken?: string;
38
38
  }
39
- declare function RequestPreAuthPayment(props: Props$6): React.JSX.Element;
39
+ declare function RequestPreAuthPayment(props: Props$7): React.JSX.Element;
40
40
 
41
- type Props$5 = {
41
+ type Props$6 = {
42
42
  merchantPublicKey: string;
43
43
  customerId?: string;
44
44
  orderID?: string;
@@ -51,9 +51,9 @@ type Props$5 = {
51
51
  isReader?: boolean;
52
52
  sessionToken?: string;
53
53
  };
54
- declare function GetPaymentPage(props: Props$5): React.JSX.Element;
54
+ declare function GetPaymentPage(props: Props$6): React.JSX.Element;
55
55
 
56
- type Props$4 = {
56
+ type Props$5 = {
57
57
  merchantPublicKey: string;
58
58
  customerId?: string;
59
59
  orderID?: string;
@@ -69,15 +69,15 @@ type Props$4 = {
69
69
  showButton?: boolean;
70
70
  sessionToken?: string;
71
71
  };
72
- declare function PreAuthPayment({ showButton, ...props }: Props$4): React.JSX.Element;
72
+ declare function PreAuthPayment({ showButton, ...props }: Props$5): React.JSX.Element;
73
73
 
74
- type Props$3 = {
74
+ type Props$4 = {
75
75
  merchantPublicKey: string;
76
76
  customerId?: string;
77
77
  };
78
- declare function AddCardEasyPay(props: Props$3): React.JSX.Element;
78
+ declare function AddCardEasyPay(props: Props$4): React.JSX.Element;
79
79
 
80
- type Props$2 = {
80
+ type Props$3 = {
81
81
  session_token: string;
82
82
  callback: (resp: any) => void;
83
83
  isloading: boolean;
@@ -92,9 +92,9 @@ type Props$2 = {
92
92
  inputClass: string;
93
93
  isDual?: boolean;
94
94
  };
95
- declare function CardOnFile({ session_token, callback, isloading, onCancel, showChecks, merchantName, signCheckbox, checkedSignCheckbox, onCheckSign, cancelbtnClass, savebtnClass, inputClass, isDual }: Props$2): React.JSX.Element;
95
+ declare function CardOnFile({ session_token, callback, isloading, onCancel, showChecks, merchantName, signCheckbox, checkedSignCheckbox, onCheckSign, cancelbtnClass, savebtnClass, inputClass, isDual }: Props$3): React.JSX.Element;
96
96
 
97
- type Props$1 = {
97
+ type Props$2 = {
98
98
  merchantPublicKey: string;
99
99
  customerId?: string;
100
100
  orderID?: string;
@@ -109,7 +109,30 @@ type Props$1 = {
109
109
  allowPartial: boolean;
110
110
  cashDiscount?: string;
111
111
  };
112
- declare function PartialPayment(props: Props$1): React.JSX.Element;
112
+ declare function PartialPayment(props: Props$2): React.JSX.Element;
113
+
114
+ type Props$1 = {
115
+ session_token: string;
116
+ surcharge: string;
117
+ amount: string;
118
+ submitBtnText?: string;
119
+ submitBtnClass?: string;
120
+ customerId?: string;
121
+ callback: (resp: any) => void;
122
+ merchantName: string;
123
+ isPreAuth: boolean;
124
+ submitBtnIcon?: any;
125
+ isRequest?: boolean;
126
+ pass_fee?: boolean;
127
+ pass_fee_amount?: number | string;
128
+ bankAmount: string;
129
+ bankSurcharge?: string;
130
+ require3ds: boolean;
131
+ autoTrigger: boolean;
132
+ isPartial?: boolean;
133
+ partialRef?: string;
134
+ };
135
+ declare const PaymentWidget: ({ amount, bankAmount, submitBtnText, session_token, customerId, callback, merchantName, isPreAuth, surcharge, submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds, autoTrigger, isPartial, bankSurcharge, partialRef }: Props$1) => React.JSX.Element;
113
136
 
114
137
  type Props = {
115
138
  session_token: string;
@@ -131,7 +154,10 @@ type Props = {
131
154
  autoTrigger: boolean;
132
155
  isPartial?: boolean;
133
156
  partialRef?: string;
157
+ onSubmit?: (submitFn: () => void) => void;
158
+ onLoad: boolean;
159
+ customCSS?: string;
134
160
  };
135
- declare const PaymentWidget: ({ amount, bankAmount, submitBtnText, session_token, customerId, callback, merchantName, isPreAuth, surcharge, submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds, autoTrigger, isPartial, bankSurcharge, partialRef }: Props) => React.JSX.Element;
161
+ declare const EmbeddedCheckout: ({ amount, bankAmount, submitBtnText, session_token, customerId, callback, merchantName, isPreAuth, surcharge, submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds, autoTrigger, isPartial, bankSurcharge, partialRef, onSubmit, onLoad, customCSS }: Props) => React.JSX.Element;
136
162
 
137
- export { AddCardEasyPay as AddCard, CardOnFile, GetPaymentPage, PartialPayment, PaymentWidget, PreAuthPayment, RequestPayment, RequestPreAuthPayment };
163
+ export { AddCardEasyPay as AddCard, CardOnFile, EmbeddedCheckout, GetPaymentPage, PartialPayment, PaymentWidget, PreAuthPayment, RequestPayment, RequestPreAuthPayment };
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ var require_package = __commonJS({
39
39
  "package.json"(exports, module) {
40
40
  module.exports = {
41
41
  name: "@fractalpay/fractalpay-next-dev",
42
- version: "0.0.235",
42
+ version: "0.0.237",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -3239,7 +3239,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3239
3239
  {
3240
3240
  id: "card_number",
3241
3241
  className: "form-control card-number-new",
3242
- style: { height: `${isSky ? "36px" : "46px"}`, display: "inline-block" }
3242
+ style: { height: `${isSky ? "36px" : "46px"}` }
3243
3243
  }
3244
3244
  ),
3245
3245
  /* @__PURE__ */ jsx17("div", { className: "card-crdi card-expiry-new", children: /* @__PURE__ */ jsxs10("div", { className: "exp-date-year-container", children: [
@@ -9383,7 +9383,20 @@ margin:0px !important;
9383
9383
  padding:0px !important;
9384
9384
  }
9385
9385
 
9386
-
9386
+
9387
+ .toggle-num-wrapper-new div#card_number {
9388
+ padding: 0px 10px;
9389
+ display: block !important;
9390
+ }
9391
+ .toggle-num-wrapper-new .card-crdi.card-expiry-new {
9392
+ padding: 0px 10px;
9393
+ }
9394
+ .toggle-num-wrapper-new .input-main-wrap-frac {
9395
+ height: 36px;
9396
+ }
9397
+ .toggle-num-wrapper-new:focus {
9398
+ border: 1px solid #004eab !important;
9399
+ }
9387
9400
 
9388
9401
  ` });
9389
9402
  }
@@ -10889,8 +10902,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10889
10902
  /* @__PURE__ */ jsx34(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
10890
10903
  setActiveinCard("form");
10891
10904
  } }),
10892
- /* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { padding: "0" }, children: /* @__PURE__ */ jsx34("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_e = Number(partialAmount)) == null ? void 0 : _e.toFixed(2)) : formatUSD((_f = Number(amount)) == null ? void 0 : _f.toFixed(2)) }) })
10893
- ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs20("form", { id: "paymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
10905
+ /* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx34("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_e = Number(partialAmount)) == null ? void 0 : _e.toFixed(2)) : formatUSD((_f = Number(amount)) == null ? void 0 : _f.toFixed(2)) }) })
10906
+ ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs20("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
10894
10907
  if (e.key === "Enter" && loading) {
10895
10908
  e.preventDefault();
10896
10909
  e.stopPropagation();
@@ -10909,7 +10922,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10909
10922
  ] }),
10910
10923
  /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
10911
10924
  /* @__PURE__ */ jsx34("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
10912
- /* @__PURE__ */ jsx34("div", { className: "toggle-num-wrapper", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx34(
10925
+ /* @__PURE__ */ jsx34("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx34(
10913
10926
  FractalFields_default,
10914
10927
  {
10915
10928
  fractalStyles,
@@ -10966,7 +10979,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10966
10979
  ] }) })
10967
10980
  ] }),
10968
10981
  /* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx34("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_h = Number(partialAmount)) == null ? void 0 : _h.toFixed(2)) : formatUSD((_i = Number(amount)) == null ? void 0 : _i.toFixed(2)) }) })
10969
- ] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
10982
+ ] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
10970
10983
  if (e.key === "Enter" && loading) {
10971
10984
  e.preventDefault();
10972
10985
  e.stopPropagation();
@@ -11054,8 +11067,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11054
11067
  /* @__PURE__ */ jsx34(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
11055
11068
  setActiveinBank("form");
11056
11069
  } }),
11057
- /* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { padding: "0" }, children: /* @__PURE__ */ jsx34("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
11058
- ] }) : /* @__PURE__ */ jsxs20("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11070
+ /* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx34("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
11071
+ ] }) : /* @__PURE__ */ jsxs20("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11059
11072
  if (e.key === "Enter" && loading) {
11060
11073
  e.preventDefault();
11061
11074
  e.stopPropagation();
@@ -11308,9 +11321,495 @@ var PaymentWidget = ({
11308
11321
  !autoTrigger ? /* @__PURE__ */ jsx35(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx35(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx35(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
11309
11322
  ] });
11310
11323
  };
11324
+
11325
+ // src/app/components/Skysystemz/EmbeddedCheckout.tsx
11326
+ import { useEffect as useEffect17, useState as useState12, useMemo as useMemo2 } from "react";
11327
+ import axios11 from "axios";
11328
+
11329
+ // src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
11330
+ import { jsx as jsx36 } from "react/jsx-runtime";
11331
+ function EmbeddedCheckoutStyles({ extraCustomCSS }) {
11332
+ return /* @__PURE__ */ jsx36("style", { children: `
11333
+
11334
+ .pay-amount-conatiner{
11335
+ margin-top: 20px !important;
11336
+ margin-bottom: 20px !important ;
11337
+ }
11338
+
11339
+ .frac-pay-container.pay-container {
11340
+ grid-template-columns:1fr;
11341
+ }
11342
+
11343
+
11344
+ /* Card */
11345
+ .plan-card {
11346
+ width: 100%;
11347
+ font-family: Inter, sans-serif;
11348
+ background: #fff;
11349
+ }
11350
+
11351
+ /* Header */
11352
+ .card-header {
11353
+ padding: 12px 0 0 0;
11354
+ }
11355
+
11356
+ /* Button */
11357
+ .collapse-btn {
11358
+ width: 100%;
11359
+ background: none;
11360
+ border: none;
11361
+ display: flex;
11362
+ justify-content: space-between;
11363
+ align-items: center;
11364
+ cursor: pointer;
11365
+ font-size: 15px;
11366
+ padding: 0;
11367
+ }
11368
+
11369
+ /* Arrow */
11370
+ .arrow {
11371
+ transition: transform 0.3s ease;
11372
+ height: 8px;
11373
+ }
11374
+
11375
+ /* Open State */
11376
+ .collapse-btn.open .arrow {
11377
+ transform: rotate(180deg); /* Down */
11378
+ }
11379
+
11380
+ /* Body */
11381
+ .card-body {
11382
+ padding: 0;
11383
+ }
11384
+
11385
+ /* Plan Header */
11386
+ .plan-header {
11387
+ font-size: 15px;
11388
+ font-weight: 600;
11389
+ }
11390
+
11391
+ /* Scrollable List */
11392
+ .plan-list {
11393
+ max-height: 200px;
11394
+ overflow-y: auto;
11395
+ padding-right: 6px;
11396
+ }
11397
+
11398
+ /* Items */
11399
+ .plan-item {
11400
+ display: flex;
11401
+ justify-content: space-between;
11402
+ padding: 6px 0;
11403
+ font-size: 14px;
11404
+ }
11405
+
11406
+ /* Badges */
11407
+ .badge {
11408
+ padding: 4px 10px;
11409
+ border-radius: 12px;
11410
+ font-size: 12px;
11411
+ font-weight: 500;
11412
+ }
11413
+
11414
+ .badge-included {
11415
+ background: #f1f3f5;
11416
+ color: #495057;
11417
+ }
11418
+
11419
+ .badge-available {
11420
+ background: #f8f9fa;
11421
+ color: #212529;
11422
+ }
11423
+
11424
+ /* Helpers */
11425
+ .row-between {
11426
+ display: flex;
11427
+ justify-content: space-between;
11428
+ }
11429
+
11430
+ .text-end {
11431
+ text-align: right;
11432
+ }
11433
+
11434
+ .text-muted {
11435
+ color: #6c757d;
11436
+ font-size: 12px;
11437
+ }
11438
+
11439
+ .fw-semibold {
11440
+ font-weight: 600;
11441
+ }
11442
+
11443
+ .mb-2 {
11444
+ margin-bottom: 8px;
11445
+ }
11446
+
11447
+ /* Divider */
11448
+ .divider {
11449
+ height: 1px;
11450
+ background: #e5e7eb;
11451
+ margin: 8px 0;
11452
+ }
11453
+
11454
+ /* Collapse Animation */
11455
+ .collapse {
11456
+ max-height: 0;
11457
+ overflow: hidden;
11458
+ transition: max-height 0.3s ease;
11459
+ }
11460
+
11461
+ .collapse.show {
11462
+ max-height: 1000px;
11463
+ }
11464
+ .frac-pay-container.pay-container {
11465
+ grid-template-columns:1fr;
11466
+ }
11467
+ .frac-payment-form-div .amt-pay-con {
11468
+ padding-right: 0px;
11469
+ }
11470
+ .frac-payment-form-div .ach-scrl {
11471
+ padding-right: 0px;
11472
+ gap: 10px;
11473
+ max-height: fit-content !important;
11474
+ min-height: fit-content !important;
11475
+ overflow: hidden !important;
11476
+ }
11477
+ .frac-payment-form-div .frac-card-bank-radio-main {
11478
+ display: flex;
11479
+ flex-direction: row;
11480
+ align-items: flex-start;
11481
+ align-self: stretch;
11482
+ border-radius: 14px;
11483
+ border: none;
11484
+ overflow: visible;
11485
+ gap: 10px;
11486
+ }
11487
+ .frac-payment-form-div .frac-card-bank-radio {
11488
+ display: flex;
11489
+ padding: 12px 16px;
11490
+ justify-content: space-between;
11491
+ align-items: center;
11492
+ align-self: stretch;
11493
+ width: 50%;
11494
+ border: 1px solid #E0DFE2;
11495
+ border-radius: 10px;
11496
+ box-shadow: rgba(149, 157, 165, 0.2) 0px 1px 4px;
11497
+ }
11498
+ .frac-payment-form-div .frac-card-bank-radio.frac-active {
11499
+ background: #fff;
11500
+ border: 2px solid #004eab !important;
11501
+ }
11502
+
11503
+ .frac-payment-form-div .form-control-frac {
11504
+ border: 1px solid #dee2e6 !important;
11505
+ border-radius: 0.375rem !important;
11506
+ background-color: #F6F6F7;
11507
+ box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
11508
+ }
11509
+ .frac-payment-form-div .form-control-frac:focus {
11510
+ border: 1px solid #004eab !important;
11511
+ }
11512
+ .frac-payment-form-div .card-expiry-new {
11513
+ border: none;
11514
+ gap: 10px;
11515
+ }
11516
+ .frac-payment-form-div .exp-date-year-container {
11517
+ gap: 10px;
11518
+ width: 100%;
11519
+ }
11520
+ .frac-payment-form-div .card-type-logo-wrap{
11521
+ position: absolute;
11522
+ right: 10px;
11523
+ max-width: 30px;
11524
+ }
11525
+ .detials-wrap.detials-wrap-1 {
11526
+ display: flex;
11527
+ flex-wrap: wrap;
11528
+ }
11529
+ @media screen and (max-width: 1280px) {
11530
+ .frac-pay-container.pay-container {
11531
+ grid-template-columns: 1fr;
11532
+ border: none;
11533
+ }
11534
+ }
11535
+ @media screen and (max-width: 899px) {
11536
+ .detials-wrap {
11537
+ grid-template-columns: 1fr !important;
11538
+ }
11539
+ .frac-payment-form-div .exp-date-year-container{
11540
+ width: 100%;}
11541
+
11542
+ }
11543
+ @media screen and (max-width: 575px) {
11544
+ .frac-payment-form-div .card-type-logo-wrap{
11545
+ max-width: 30px;
11546
+ }
11547
+ form#ACHPaymentForm .ach-scrl {
11548
+ grid-template-columns: 1fr !important;
11549
+ }
11550
+ @media screen and (max-width: 375px) {
11551
+ .frac-payment-form-div .exp-date-year-container {
11552
+ flex-direction: column;
11553
+ }
11554
+ .parent-pay-container {
11555
+ padding: 10px;
11556
+ }
11557
+ }
11558
+ }
11559
+ .box-inner-card-text{
11560
+ display: flex;
11561
+ gap: 0px;
11562
+ flex-direction: column;
11563
+ }
11564
+ .box-inner-card-text .frac-payment-type-logo {
11565
+ width: 17px;
11566
+ height: 17px;
11567
+ aspect-ratio: 1/1;
11568
+ }
11569
+ .exp-date-year-wrap.form-control-frac input {
11570
+ background: transparent;
11571
+ border: none;
11572
+ outline: none;
11573
+ font-size: 1rem;
11574
+ font-weight: 400;
11575
+ }
11576
+ .exp-date-year-wrap.form-control-frac {
11577
+ display: flex;
11578
+ gap: 2px;
11579
+ }
11580
+ .exp-date-year-wrap input.exp-month {
11581
+ width: 32px;
11582
+ }
11583
+ .detials-wrap {
11584
+ display: grid;
11585
+ grid-template-columns: 1fr 1fr;
11586
+ gap: 10px;
11587
+ }
11588
+ .detials-wrap.detials-wrap-2{
11589
+ grid-template-columns: 1fr 1fr;
11590
+ }
11591
+ form#ACHPaymentForm .ach-scrl {
11592
+ display: grid;
11593
+ grid-gap: 0px 10px;
11594
+ grid-template-columns: 1fr;
11595
+ }
11596
+ .plan-list {
11597
+ max-height: 130px;
11598
+ min-height: 130px;
11599
+ overflow-y: auto;
11600
+ padding-right: 6px;
11601
+ }
11602
+ .plan-list::-webkit-scrollbar {
11603
+ width: 3px;
11604
+ background-color: #F5F5F5;
11605
+ }
11606
+ .plan-list::-webkit-scrollbar-thumb {
11607
+ background-color: #35254D;
11608
+ }
11609
+ div#cvv {
11610
+ border-top-left-radius: 0;
11611
+ border-bottom-left-radius: 0;
11612
+ border-top: 0;
11613
+ border-bottom: 0;
11614
+ border-right: 0;
11615
+ }
11616
+ div#exp_year {
11617
+ height: 36px;
11618
+ width: calc(100% + 1px);
11619
+ border-radius: 0;
11620
+ border-top: 0;
11621
+ border-bottom: 0;
11622
+ border-right: 1px solid #dee2e6;
11623
+ }
11624
+ div#exp_month {
11625
+ width: calc(100% + 1px);
11626
+ border-top-right-radius: 0;
11627
+ border-bottom-right-radius: 0;
11628
+ border: 0;
11629
+ border-right: 1px solid #dee2e6;
11630
+ }
11631
+ .exp-date-year-container .form-group {
11632
+ flex: 1;
11633
+ }
11634
+ .input-main-wrap-frac{
11635
+ margin:0px !important;
11636
+ padding:0px !important;
11637
+ }
11638
+ .toggle-num-wrapper.toggle-num-wrapper-new {
11639
+ border: 1px solid #dee2e6 !important;
11640
+ border-radius: 0.375rem !important;
11641
+ background-color: #F6F6F7;
11642
+ box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
11643
+ }
11644
+ .toggle-num-wrapper-new div#card_number {
11645
+ padding: 0px 10px;
11646
+ border: none;
11647
+ border-bottom: 1px solid #dee2e6;
11648
+ }
11649
+ .toggle-num-wrapper-new .card-crdi.card-expiry-new {
11650
+ padding: 0px 10px;
11651
+ }
11652
+ .toggle-num-wrapper-new .input-main-wrap-frac {
11653
+ height: 36px;
11654
+ }
11655
+ .toggle-num-wrapper-new:focus {
11656
+ border: 1px solid #004eab !important;
11657
+ }
11658
+ .frac-card-title-main {
11659
+ display: flex;
11660
+ align-items: start;
11661
+ gap: 4px;
11662
+ flex-direction: column;
11663
+ }
11664
+ .parent-pay-container {
11665
+ padding: 24px;
11666
+ background-color: #ffffff !important;
11667
+ border-radius: 15px;
11668
+ min-width: 300px;
11669
+ }
11670
+
11671
+
11672
+ ${extraCustomCSS}
11673
+
11674
+ ` });
11675
+ }
11676
+
11677
+ // src/app/components/Skysystemz/EmbeddedCheckout.tsx
11678
+ import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
11679
+ var EmbeddedCheckout = ({
11680
+ amount,
11681
+ bankAmount,
11682
+ submitBtnText = "Pay",
11683
+ session_token,
11684
+ customerId,
11685
+ callback,
11686
+ merchantName = "merchant",
11687
+ isPreAuth,
11688
+ surcharge = "0",
11689
+ submitBtnClass,
11690
+ submitBtnIcon,
11691
+ isRequest,
11692
+ pass_fee,
11693
+ pass_fee_amount,
11694
+ require3ds = false,
11695
+ autoTrigger = false,
11696
+ isPartial,
11697
+ bankSurcharge,
11698
+ partialRef,
11699
+ onSubmit,
11700
+ onLoad,
11701
+ customCSS: customCSS2
11702
+ }) => {
11703
+ const [show, setShow] = useState12(false);
11704
+ const [loading, setLoading] = useState12(false);
11705
+ const [childHandleClose, setChildHandleClose] = useState12(() => () => {
11706
+ });
11707
+ const [orderGuid, setOrderGuid] = useState12(null);
11708
+ const [remainingAmount, setRemainingAmount] = useState12(null);
11709
+ const initialCommonProps = useMemo2(
11710
+ () => ({
11711
+ amount,
11712
+ bankAmount,
11713
+ submitBtnText,
11714
+ session_token,
11715
+ customerId,
11716
+ callback,
11717
+ merchantName,
11718
+ isPreAuth,
11719
+ surcharge,
11720
+ submitBtnClass,
11721
+ submitBtnIcon,
11722
+ isRequest,
11723
+ pass_fee,
11724
+ pass_fee_amount,
11725
+ require3ds,
11726
+ autoTrigger,
11727
+ setShow,
11728
+ setHandleCloseRef: setChildHandleClose,
11729
+ isPartial,
11730
+ bankSurcharge,
11731
+ partialRef
11732
+ }),
11733
+ [
11734
+ amount,
11735
+ bankAmount,
11736
+ submitBtnText,
11737
+ session_token,
11738
+ customerId,
11739
+ callback,
11740
+ merchantName,
11741
+ isPreAuth,
11742
+ surcharge,
11743
+ submitBtnClass,
11744
+ submitBtnIcon,
11745
+ isRequest,
11746
+ pass_fee,
11747
+ pass_fee_amount,
11748
+ require3ds,
11749
+ autoTrigger,
11750
+ isPartial,
11751
+ bankSurcharge,
11752
+ partialRef
11753
+ ]
11754
+ );
11755
+ const [commonProps, setCommonProps] = useState12(initialCommonProps);
11756
+ useEffect17(() => {
11757
+ if (show) {
11758
+ setCommonProps(initialCommonProps);
11759
+ }
11760
+ }, [show, initialCommonProps]);
11761
+ const getskyosOrderDetails = async () => {
11762
+ var _a;
11763
+ setLoading(true);
11764
+ try {
11765
+ const res = await axios11.get(
11766
+ `${masterBaseUrl}api/v1/gateway/get-order-details/${session_token}`,
11767
+ { params: { isPartial, partialRef } }
11768
+ );
11769
+ if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.result) {
11770
+ const data = res.data.data;
11771
+ if (data == null ? void 0 : data.orderGuid) {
11772
+ setOrderGuid(data == null ? void 0 : data.orderGuid);
11773
+ setRemainingAmount(data == null ? void 0 : data.remainingAmount);
11774
+ }
11775
+ setCommonProps((prev) => __spreadProps(__spreadValues({}, prev), {
11776
+ amount: data.amount,
11777
+ pass_fee_amount: data.pass_fee_amount,
11778
+ pass_fee: data.pass_fee
11779
+ }));
11780
+ }
11781
+ } catch (error) {
11782
+ console.log("error while getting skyosorderdeatils", error);
11783
+ } finally {
11784
+ setLoading(false);
11785
+ }
11786
+ };
11787
+ useEffect17(() => {
11788
+ if (show && isPartial && partialRef) {
11789
+ getskyosOrderDetails();
11790
+ }
11791
+ }, [show, isPartial, partialRef]);
11792
+ console.log(onLoad, "onLoad");
11793
+ return /* @__PURE__ */ jsxs22(Fragment21, { children: [
11794
+ /* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11795
+ /* @__PURE__ */ jsx37(DataScript, {}),
11796
+ /* @__PURE__ */ jsx37(FractalTokenizerScript, {}),
11797
+ /* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
11798
+ /* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
11799
+ /* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
11800
+ /* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
11801
+ /* @__PURE__ */ jsx37(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
11802
+ !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
11803
+ submitBtnText,
11804
+ submitBtnIcon
11805
+ ] }),
11806
+ !autoTrigger ? /* @__PURE__ */ jsx37(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
11807
+ ] });
11808
+ };
11311
11809
  export {
11312
11810
  AddCardEasyPay as AddCard,
11313
11811
  CardOnFile,
11812
+ EmbeddedCheckout,
11314
11813
  GetPaymentPage,
11315
11814
  PartialPayment,
11316
11815
  PaymentWidget,