Tokenizacion Netpay

Tokenizacion de tarjetas bancarias con Netpay

HTML

<!DOCTYPE html>
<html>

  <head>
    <title>NetPay.js</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <script type="text/javascript" src="https://docs.netpay.mx/cdn/v1.3/netpay.min.js"></script>

  </head>

  <body style="padding: 50px;">
    <div id="netpay-form"></div>
    <script>
      NetPay.setApiKey("pk_netpay_GjffDZwRpkuKNooyJJwVinajH");
      NetPay.setSandboxMode(true);
      //NetPay.saveCard(false);

      function success(e) {
        console.log("Token created successfully");
        console.log(e);
        console.log(e.message.deviceInformation.httpBrowserColorDepth)
      }

      function error(e) {
        console.log("Something went wrong!");
        console.log(e);
      }

      NetPay.form.generate("netpay-form", success, error, {
        title: "Pagos con tarjeta",
        submitText: "Continuar"
      });
      //NetPay.form.reset();
      let deviceInformation = NetPay.form.deviceInformation();
      console.log(deviceInformation);
      console.log(deviceInformation.httpBrowserColorDepth);

    </script>
  </body>

</html>