@suportepos/split-checkout 0.5.2 → 0.5.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/README.md +3 -0
- package/dist/README.md +3 -0
- package/dist/index.es.js +17 -6
- package/dist/index.umd.js +1 -1
- package/dist/standalone/suportepos-checkout.js +1 -1
- package/dist/types/CheckoutFlow.d.ts +2 -1
- package/dist/types/CheckoutFlowContent.d.ts +1 -1
- package/dist/types/SplitCardForm.d.ts +2 -1
- package/dist/types/lib/CheckoutFlow.d.ts +2 -1
- package/dist/types/lib/CheckoutFlowContent.d.ts +1 -1
- package/dist/types/lib/SplitCardForm.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,6 +72,7 @@ export default function App() {
|
|
|
72
72
|
cor="#32a852"
|
|
73
73
|
pagamento="card"
|
|
74
74
|
resumo={true}
|
|
75
|
+
parcelas={2}
|
|
75
76
|
onResponse={(result) => {
|
|
76
77
|
if (result.sucesso) {
|
|
77
78
|
alert(`Sucesso: ${result.mensagem}`);
|
|
@@ -133,6 +134,7 @@ export default function App() {
|
|
|
133
134
|
valorTotal: 105.25,
|
|
134
135
|
resumo: true,
|
|
135
136
|
merchantId: "********************************67b7",
|
|
137
|
+
parcelas: 2,
|
|
136
138
|
onResponse: (result) => {
|
|
137
139
|
console.log("Resposta do backend:", result);
|
|
138
140
|
alert(result.sucesso ? "✅ Pagamento aprovado" : "❌ Falha no pagamento");
|
|
@@ -162,6 +164,7 @@ export default function App() {
|
|
|
162
164
|
| `cor` | `string` | ❌ | Customização da cor dos botões |
|
|
163
165
|
| `pagamento` | `string` | ❌ | Meio de pagamento para pular opção de seleção (card, pix) |
|
|
164
166
|
| `resumo` | `boolean` | ❌ | Resumo com as informações de valor total e produtos |
|
|
167
|
+
| `parcelas` | `number` | ❌ | Quantidade de parcelas para pagamento |
|
|
165
168
|
---
|
|
166
169
|
|
|
167
170
|
## 🎯 Estrutura do Callback `onResponse`
|
package/dist/README.md
CHANGED
|
@@ -72,6 +72,7 @@ export default function App() {
|
|
|
72
72
|
cor="#32a852"
|
|
73
73
|
pagamento="card"
|
|
74
74
|
resumo={true}
|
|
75
|
+
parcelas={2}
|
|
75
76
|
onResponse={(result) => {
|
|
76
77
|
if (result.sucesso) {
|
|
77
78
|
alert(`Sucesso: ${result.mensagem}`);
|
|
@@ -133,6 +134,7 @@ export default function App() {
|
|
|
133
134
|
valorTotal: 105.25,
|
|
134
135
|
resumo: true,
|
|
135
136
|
merchantId: "********************************67b7",
|
|
137
|
+
parcelas: 2,
|
|
136
138
|
onResponse: (result) => {
|
|
137
139
|
console.log("Resposta do backend:", result);
|
|
138
140
|
alert(result.sucesso ? "✅ Pagamento aprovado" : "❌ Falha no pagamento");
|
|
@@ -162,6 +164,7 @@ export default function App() {
|
|
|
162
164
|
| `cor` | `string` | ❌ | Customização da cor dos botões |
|
|
163
165
|
| `pagamento` | `string` | ❌ | Meio de pagamento para pular opção de seleção (card, pix) |
|
|
164
166
|
| `resumo` | `boolean` | ❌ | Resumo com as informações de valor total e produtos |
|
|
167
|
+
| `parcelas` | `number` | ❌ | Quantidade de parcelas para pagamento |
|
|
165
168
|
---
|
|
166
169
|
|
|
167
170
|
## 🎯 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.
|
|
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
|
|
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
|
}
|