-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
72 lines (66 loc) · 1.92 KB
/
index.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<html>
<head>
<title>Vue RavePayment Example</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="../dist/rave.min.js"></script>
<style type="text/css">
body {
font-size: 1em;
font-family: 'Tahoma', sans-serif;
}
.paymentbtn {
font-size: 3em;
color: red;
}
</style>
</head>
<body>
<div id="app">
<Rave
style-class="paymentbtn"
:email="email"
:amount="amount"
:reference="reference"
:rave-key="raveKey"
:callback="callback"
:close="close"
currency="NGN"
>
<i class="fas fa-money-bill-alt"></i>
Payment Make Payment - 1
</Rave>
</div>
<script type="text/javascript">
new Vue({
el: '#app',
components:{
'Rave': VueRavePayment.default
},
computed: {
reference(){
let text = "";
let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for( let i=0; i < 10; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
},
methods: {
callback: function(response){
console.log(response)
},
close: function(){
console.log("Payment closed")
}
},
data: {
raveKey: "FLWPUBK_TEST-ad5ad78e73e83375c1cf9a7f1fe2e5b0-X",
email: "foobar@example.com",
amount: 90000
}
});
</script>
</body>
</html>