boolean processTransaction(String)
Processes a sale or refund transaction.
Parameters
Name | Description |
transJson |
String String representation of an EMVTransaction object. |
Remarks
Calls window.onKioEMVTransactionComplete on completion.
Examples
function processSaleTransaction() {
var transaction = {
type: 1,
amount: document.getElementById('saleAmount').value
};
document.getElementById('output').innerText = '';
KioEMV.processTransaction(JSON.stringify(transaction));
}
function processRefundTransaction() {
var transaction = {
type: 2,
amount: document.getElementById('refundAmount').value,
reference: document.getElementById('refundRef').value
};
document.getElementById('output').innerText = '';
KioEMV.processTransaction(JSON.stringify(transaction));
}
function onKioEMVTransactionComplete(response) {
document.getElementById('output').innerText = JSON.stringify(response, null, 2);
}
Requirements
KioWare for Android version 3.23 or greater.