POS product Information

by IntegrationSupport

HTML

<script src="https://iclientsimulator.test.tyro.com/iclient-with-ui-v1.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<h2>Pos Product Information Demo</h2>

<button type="button" class="mt10 btn btn-primary" onclick="showPosInfo()">Show POS Information</button>
<br>
<br>
<h3 class="mt10">Declared POS Information</h3>

<table style="width: 100%;">
    <tr valign="top">
        <td>
            <div id="result"></div>
        </td>
    </tr>
</table>
</div>

CSS

body {
    margin: 10px;
}
h3 {
    margin-top: 0;
}
td {
    padding: 3px;
}
.mt10 {
    margin-top: 10px;
}

JavaScript

// Before running this fiddle, you will need to pair your virtual terminal with the browser using this page:
// https://iclientsimulator.test.tyro.com/configuration.html

var apiKey = "Test API Key"; // API Key not validated test environments
const posProductInfo = {
    posProductVendor: "Acme Co",
    posProductName: "Acme Cloud POS",
    posProductVersion: "1.0.0",
    siteReference: "E.g. my customer ID or address"
};

var iclient = new TYRO.IClientWithUI(apiKey, posProductInfo);
console.log(iclient);

// The Tyro simulator uses 'magic' amounts. Refer to this page for more details:
// https://integrationsimulator.test.tyro.com/docs/

function showPosInfo() {
	var PosVendor = iclient.posProductData.posProductVendor;
  var PosProduct = iclient.posProductData.posProductName;
	var PosVersion = iclient.posProductData.posProductVersion;

   
   var result = "POS product vendor declared in iClient is " + "<b>" + PosVendor + "</b>" + "<br>" + "POS product name declared in iClient is " + "<b>" +  PosProduct + "</b>" + "<br>" + "POS product version declared in iClient is " + "<b>" + PosVersion + "</b>";
   document.getElementById("result").innerHTML=result;
   
}