Skip to content

Commit 87ec4eb

Browse files
committed
add more access_code,firstname, lastname & channels to paystack modal
1 parent 0e15e89 commit 87ec4eb

File tree

4 files changed

+32
-8
lines changed

4 files changed

+32
-8
lines changed

dist/paystack.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/commonjs/App.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
<paystack
55
:amount="amount"
66
:email="email"
7+
:firstname="firstname"
8+
:lastname="lastname"
9+
:accessCode="accessCode"
10+
:ref="reference"
711
:paystackkey="paystackkey"
812
:reference="reference"
913
:callback="callback"
@@ -25,12 +29,17 @@ export default {
2529
data(){
2630
return{
2731
paystackkey: "pk_test_xxxxxxxxxxxxxxxxxxxxxxx",
32+
firstname: "Foo",
33+
lastname: "Bar",
2834
email: "foobar@example.com",
29-
amount: 1000000
35+
amount: 1000000,
36+
accessCode: "example-access-code",
37+
reference: "example-reference",
38+
channels: ['card']
3039
}
3140
},
3241
computed: {
33-
reference(){
42+
genReference(){
3443
let text = "";
3544
let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
3645

src/paystack.vue

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ export default {
2727
type: String,
2828
required: true
2929
},
30+
firstname: {
31+
type: String,
32+
default: ""
33+
},
34+
lastname: {
35+
type: String,
36+
default: ""
37+
},
3038
amount: {
3139
type: Number,
3240
required: true
@@ -35,6 +43,14 @@ export default {
3543
type: String,
3644
required: true
3745
},
46+
channels: {
47+
type: Array,
48+
default: function() { return ["card","bank"]}
49+
},
50+
accessCode:{
51+
type: String,
52+
default: ""
53+
},
3854
callback: {
3955
type: Function,
4056
required: true,
@@ -115,7 +131,11 @@ export default {
115131
const paystackOptions = {
116132
key: this.paystackkey,
117133
email: this.email,
134+
firstname: this.firstname,
135+
lastname: this.lastname,
136+
channels: this.channels,
118137
amount: this.amount,
138+
access_code: this.accessCode,
119139
ref: this.reference,
120140
callback: (response) => {
121141
this.callback(response)

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5508,11 +5508,6 @@ vm-browserify@0.0.4:
55085508
dependencies:
55095509
indexof "0.0.1"
55105510

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-
55165511
vue-eslint-parser@^5.0.0:
55175512
version "5.0.0"
55185513
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz#00f4e4da94ec974b821a26ff0ed0f7a78402b8a1"

0 commit comments

Comments
 (0)