1
1
<template >
2
- <div class =" App" >
3
- <p class =" App-intro" >
4
- <paystack
5
- :amount =" amount"
6
- :email =" email"
7
- :firstname =" firstname"
8
- :lastname =" lastname"
9
- :accessCode =" accessCode"
10
- :splitCode =" splitCode"
11
- :split =" split"
12
- :paystackkey =" paystackkey"
13
- :reference =" genReference"
14
- :callback =" callback"
15
- :close =" close"
16
- :embed =" false"
17
- >
18
- <i >Pay me, My Money</i >
19
- </paystack >
20
- </p >
21
- </div >
2
+ <div class =" App" >
3
+ <p class =" App-intro" >
4
+ <paystack
5
+ :amount =" amount"
6
+ :email =" email"
7
+ :firstname =" firstname"
8
+ :lastname =" lastname"
9
+ :accessCode =" accessCode"
10
+ :splitCode =" splitCode"
11
+ :split =" split"
12
+ :paystackkey =" paystackkey"
13
+ :reference =" genReference"
14
+ :callback =" callback"
15
+ :close =" close"
16
+ :embed =" false"
17
+ >
18
+ <i >Pay me, My Money</i >
19
+ </paystack >
20
+ <paystack
21
+ :amount =" amount"
22
+ :email =" email"
23
+ :firstname =" firstname"
24
+ :lastname =" lastname"
25
+ :accessCode =" accessCode"
26
+ :splitCode =" splitCode"
27
+ :split =" split"
28
+ :paystackkey =" paystackkey"
29
+ :reference =" genReference"
30
+ :callback =" callback"
31
+ :close =" close"
32
+ :embed =" false"
33
+ :custombutton =" true"
34
+ >
35
+ <button
36
+ style ="
37
+ border-radius : 5px ;
38
+ color : white ;
39
+ padding : 15px ;
40
+ background : crimson ;
41
+ border : 1px solid ;
42
+ cursor : pointer ;
43
+ margin : 20px ;
44
+ "
45
+ >
46
+ PAY WITH CUSTOM BUTTON
47
+ </button >
48
+ </paystack >
49
+ </p >
50
+ </div >
22
51
</template >
23
52
24
53
<script type="text/javascript">
@@ -29,34 +58,34 @@ export default {
29
58
},
30
59
data (){
31
60
return {
32
- paystackkey: " pk_test_xxxxxxxxxxxxxxxxxxxxxxx" ,
33
- firstname: " Foo" ,
34
- lastname: " Bar" ,
35
- email: " foo@bar.com" ,
36
- amount: 200000 ,
37
- splitCode: " " ,
38
- split: {},
39
- channels: [' card' ]
61
+ paystackkey: " pk_test_xxxxxxxxxxxxxxxxxxxxxxx" ,
62
+ firstname: " Foo" ,
63
+ lastname: " Bar" ,
64
+ email: " foo@bar.com" ,
65
+ amount: 200000 ,
66
+ splitCode: " " ,
67
+ split: {},
68
+ channels: [' card' ]
40
69
}
41
70
},
42
71
computed: {
43
- genReference (){
44
- let text = " " ;
45
- let possible = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ;
72
+ genReference (){
73
+ let text = " " ;
74
+ let possible = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ;
46
75
47
- for ( let i= 0 ; i < 10 ; i++ )
48
- text += possible .charAt (Math .floor (Math .random () * possible .length ));
76
+ for ( let i= 0 ; i < 10 ; i++ )
77
+ text += possible .charAt (Math .floor (Math .random () * possible .length ));
49
78
50
- return text;
51
- }
79
+ return text;
80
+ }
52
81
},
53
82
methods: {
54
- callback : function (response ){
55
- console .log (response)
56
- },
57
- close : function (){
58
- console .log (" Payment closed" )
59
- }
83
+ callback : function (response ){
84
+ console .log (response)
85
+ },
86
+ close : function (){
87
+ console .log (" Payment closed" )
88
+ }
60
89
}
61
90
}
62
91
</script >
0 commit comments