@suportepos/split-checkout 0.3.8 → 0.4.0

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.es.js CHANGED
@@ -21697,7 +21697,7 @@ function SplitCheckoutForm({
21697
21697
  onResponse,
21698
21698
  uuid
21699
21699
  }) {
21700
- const apiUrl = producao ? "http://localhost:8003" : "http://localhost:8003";
21700
+ const apiUrl = producao ? "https://api-conciliapos-stag.suportepos.com.br" : "https://api-conciliapos-stag.suportepos.com.br";
21701
21701
  useMediaQuery("(max-width:900px)");
21702
21702
  const [step, setStep] = useState("card");
21703
21703
  const maskCard = (v) => v.replace(/\D/g, "").trim();
@@ -22173,8 +22173,7 @@ function SplitPixForm({
22173
22173
  onResponse,
22174
22174
  uuid
22175
22175
  }) {
22176
- console.log({ cliente });
22177
- const apiUrl = producao ? "http://localhost:8003" : "http://localhost:8003";
22176
+ const apiUrl = producao ? "https://api-conciliapos-stag.suportepos.com.br" : "https://api-conciliapos-stag.suportepos.com.br";
22178
22177
  useMediaQuery("(max-width:900px)");
22179
22178
  const [copied, setCopied] = useState(false);
22180
22179
  const [buyerName, setBuyerName] = useState(cliente?.nomeComprador ?? "");
@@ -22226,11 +22225,13 @@ function SplitPixForm({
22226
22225
  })
22227
22226
  });
22228
22227
  const data = await res.json();
22228
+ if (!data?.sucesso) {
22229
+ onResponse?.(data);
22230
+ }
22229
22231
  if (data.codigo_copia_cola && data.qr_code) {
22230
22232
  setPixData(data);
22231
22233
  }
22232
22234
  } catch (err) {
22233
- console.error("Erro ao gerar PIX:", err);
22234
22235
  } finally {
22235
22236
  setLoading(false);
22236
22237
  }