-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
21 lines (21 loc) · 840 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<div id="console">
</div>
<script>
if (window.samsungPay) {
document.getElementById("console").innerHTML = "Samsung Pay API is supported!";
var optionalData = {
tranId: '123'
};
window.samsungPay.canMakePayment().then( response => {
if (response) {
document.getElementById("console").innerHTML = "Samsung Pay API canMakePayment returned true.";
} else {
document.getElementById("console").innerHTML = "Samsung Pay API canMakePayment returned false.";
}
}).catch(err => {
document.getElementById("console").innerHTML = "Samsung Pay API canMakePayment returned error: " + err;
});
} else {
document.getElementById("console").innerHTML = "Samsung Pay API is *not* supported!";
}
</script>