@suportepos/split-checkout 0.5.2 → 0.5.3

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/README.md CHANGED
@@ -133,6 +133,7 @@ export default function App() {
133
133
  valorTotal: 105.25,
134
134
  resumo: true,
135
135
  merchantId: "********************************67b7",
136
+ parcelas: 2,
136
137
  onResponse: (result) => {
137
138
  console.log("Resposta do backend:", result);
138
139
  alert(result.sucesso ? "✅ Pagamento aprovado" : "❌ Falha no pagamento");
@@ -162,6 +163,7 @@ export default function App() {
162
163
  | `cor` | `string` | ❌ | Customização da cor dos botões |
163
164
  | `pagamento` | `string` | ❌ | Meio de pagamento para pular opção de seleção (card, pix) |
164
165
  | `resumo` | `boolean` | ❌ | Resumo com as informações de valor total e produtos |
166
+ | `parcelas` | `number` | ❌ | Quantidade de parcelas para pagamento |
165
167
  ---
166
168
 
167
169
  ## 🎯 Estrutura do Callback `onResponse`
package/dist/README.md CHANGED
@@ -133,6 +133,7 @@ export default function App() {
133
133
  valorTotal: 105.25,
134
134
  resumo: true,
135
135
  merchantId: "********************************67b7",
136
+ parcelas: 2,
136
137
  onResponse: (result) => {
137
138
  console.log("Resposta do backend:", result);
138
139
  alert(result.sucesso ? "✅ Pagamento aprovado" : "❌ Falha no pagamento");
@@ -162,6 +163,7 @@ export default function App() {
162
163
  | `cor` | `string` | ❌ | Customização da cor dos botões |
163
164
  | `pagamento` | `string` | ❌ | Meio de pagamento para pular opção de seleção (card, pix) |
164
165
  | `resumo` | `boolean` | ❌ | Resumo com as informações de valor total e produtos |
166
+ | `parcelas` | `number` | ❌ | Quantidade de parcelas para pagamento |
165
167
  ---
166
168
 
167
169
  ## 🎯 Estrutura do Callback `onResponse`
package/dist/index.es.js CHANGED
@@ -21696,7 +21696,8 @@ function SplitCheckoutForm({
21696
21696
  onBack,
21697
21697
  onResponse,
21698
21698
  uuid,
21699
- resumo
21699
+ resumo,
21700
+ parcelas
21700
21701
  }) {
21701
21702
  const apiUrl = producao ? "https://api-conciliapos.suportepos.com.br" : "https://api-conciliapos-stag.suportepos.com.br";
21702
21703
  useMediaQuery("(max-width:900px)");
@@ -21842,7 +21843,7 @@ function SplitCheckoutForm({
21842
21843
  codigoPedido,
21843
21844
  tokenPagamento: response.CardToken ?? response.PaymentToken,
21844
21845
  valor,
21845
- parcelas: installments,
21846
+ parcelas: parcelas ?? installments,
21846
21847
  nomeComprador: buyerName,
21847
21848
  emailComprador: buyerEmail,
21848
21849
  telefoneComprador: buyerPhone,
@@ -21946,7 +21947,15 @@ function SplitCheckoutForm({
21946
21947
  }
21947
21948
  )
21948
21949
  ] }),
21949
- /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl, { fullWidth: true, children: [
21950
+ parcelas != null ? /* @__PURE__ */ jsxRuntimeExports.jsx(
21951
+ TextField,
21952
+ {
21953
+ label: "Quantidade de Parcelas",
21954
+ value: parcelas,
21955
+ disabled: true,
21956
+ fullWidth: true
21957
+ }
21958
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl, { fullWidth: true, children: [
21950
21959
  /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel, { children: "Quantidade de Parcelas" }),
21951
21960
  /* @__PURE__ */ jsxRuntimeExports.jsx(
21952
21961
  Select,
@@ -21956,7 +21965,7 @@ function SplitCheckoutForm({
21956
21965
  onChange: (e) => setInstallments(Number(e.target.value)),
21957
21966
  children: installmentsOptions.map((n) => /* @__PURE__ */ jsxRuntimeExports.jsxs(MenuItem, { value: n, children: [
21958
21967
  n,
21959
- "x de R$ ",
21968
+ "x de ",
21960
21969
  BRL.format(valor / n)
21961
21970
  ] }, n))
21962
21971
  }
@@ -22446,7 +22455,8 @@ function CheckoutFlowContent({
22446
22455
  producao,
22447
22456
  onResponse,
22448
22457
  paymentEnabled,
22449
- resumo
22458
+ resumo,
22459
+ parcelas
22450
22460
  }) {
22451
22461
  useMediaQuery("(max-width:900px)");
22452
22462
  useTheme();
@@ -22516,7 +22526,8 @@ function CheckoutFlowContent({
22516
22526
  onBack: () => setStep("select"),
22517
22527
  onResponse,
22518
22528
  uuid,
22519
- resumo
22529
+ resumo,
22530
+ parcelas
22520
22531
  }
22521
22532
  );
22522
22533
  }