File tree Expand file tree Collapse file tree 4 files changed +32
-8
lines changed Expand file tree Collapse file tree 4 files changed +32
-8
lines changed Original file line number Diff line number Diff line change 4
4
<paystack
5
5
:amount =" amount"
6
6
:email =" email"
7
+ :firstname =" firstname"
8
+ :lastname =" lastname"
9
+ :accessCode =" accessCode"
10
+ :ref =" reference"
7
11
:paystackkey =" paystackkey"
8
12
:reference =" reference"
9
13
:callback =" callback"
@@ -25,12 +29,17 @@ export default {
25
29
data (){
26
30
return {
27
31
paystackkey: " pk_test_xxxxxxxxxxxxxxxxxxxxxxx" ,
32
+ firstname: " Foo" ,
33
+ lastname: " Bar" ,
28
34
email: " foobar@example.com" ,
29
- amount: 1000000
35
+ amount: 1000000 ,
36
+ accessCode: " example-access-code" ,
37
+ reference: " example-reference" ,
38
+ channels: [' card' ]
30
39
}
31
40
},
32
41
computed: {
33
- reference (){
42
+ genReference (){
34
43
let text = " " ;
35
44
let possible = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ;
36
45
Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ export default {
27
27
type: String ,
28
28
required: true
29
29
},
30
+ firstname: {
31
+ type: String ,
32
+ default: " "
33
+ },
34
+ lastname: {
35
+ type: String ,
36
+ default: " "
37
+ },
30
38
amount: {
31
39
type: Number ,
32
40
required: true
@@ -35,6 +43,14 @@ export default {
35
43
type: String ,
36
44
required: true
37
45
},
46
+ channels: {
47
+ type: Array ,
48
+ default : function () { return [" card" ," bank" ]}
49
+ },
50
+ accessCode: {
51
+ type: String ,
52
+ default: " "
53
+ },
38
54
callback: {
39
55
type: Function ,
40
56
required: true ,
@@ -115,7 +131,11 @@ export default {
115
131
const paystackOptions = {
116
132
key: this .paystackkey ,
117
133
email: this .email ,
134
+ firstname: this .firstname ,
135
+ lastname: this .lastname ,
136
+ channels: this .channels ,
118
137
amount: this .amount ,
138
+ access_code: this .accessCode ,
119
139
ref: this .reference ,
120
140
callback : (response ) => {
121
141
this .callback (response)
Original file line number Diff line number Diff line change @@ -5508,11 +5508,6 @@ vm-browserify@0.0.4:
5508
5508
dependencies :
5509
5509
indexof "0.0.1"
5510
5510
5511
- vue-async-computed@^3.6.1 :
5512
- version "3.6.1"
5513
- resolved "https://registry.yarnpkg.com/vue-async-computed/-/vue-async-computed-3.6.1.tgz#6b790e2125347c678d1b82b10a5b03b41d7b86d0"
5514
- integrity sha512-8FFDTqfdvKrzK5Fr7nNHZgP6sQ2hTUELTrLn25i8VW/g06MztD+FOe1gs0RYVpRkPlcrykf2hbJxNYra1c4OGg==
5515
-
5516
5511
vue-eslint-parser@^5.0.0 :
5517
5512
version "5.0.0"
5518
5513
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz#00f4e4da94ec974b821a26ff0ed0f7a78402b8a1"
You can’t perform that action at this time.
0 commit comments