forked from nj3ma/mngapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmngapi.html
More file actions
31 lines (29 loc) · 889 Bytes
/
mngapi.html
File metadata and controls
31 lines (29 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
CTYPE html>
<head>
<title> mngapi </title>
<style>
body{
background-color:whitesmoke;
}
</style>
<script type="text/javascript">
var userInput = prompt ( "How many Kes do you wish to send?");
var amount = userInput/1;
var upperLimit = new Array(49,100,500,5000,7500,10000,15000,20000,25000,30000,35000,40000,45000,50000,70000);
tier = 0;
var i = 0;
while (upperLimit[i] < amount ) { (upperLimit[i++]);
tier++;
}
var sendingFees = new Array (3, 5, 27, 33, 55, 50, 60, 70);
var withdrawalFees = new Array (0,10, 27, 27, 33, 49, 60, 70);
var fee = sendingFees[tier] + withdrawalFees[tier];
var total = fee + amount;
var display = " transfer fee: " + sendingFees[tier] + " agent withdrawal fee: " + withdrawalFees[tier] + " total fees: " + fee + " You need: " + total;
alert(display);
document.writeln (display);
</script>
</head>
<body>
</body>
</html>