You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(!this.key)returnconsole.error("Paystack key cannot be empty")
41
-
if(!this.email)returnconsole.error("Paystack email cannot be empty")
42
-
if(!this.amount)returnconsole.error("Paystack amount cannot be empty")
43
-
if(!this.ref)returnconsole.error("Paystack ref cannot be empty")
39
+
checkInput(){
40
+
if(!this.key)returnconsole.error("Paystack key cannot be empty")
41
+
if(!this.email)returnconsole.error("Paystack email cannot be empty")
42
+
if(!this.amount)returnconsole.error("Paystack amount cannot be empty")
43
+
if(!this.ref)returnconsole.error("Paystack ref cannot be empty")
44
44
if(!this.callback.observers.length)returnconsole.error(`Insert a callback output like so (callback)='PaymentComplete($event)' to check payment status`)
45
45
returntrue
46
46
}
47
-
47
+
48
48
setUp(){
49
49
this.paystackOptions={
50
50
container: "paystackEmbedContainer",
51
-
key: this.key,
52
-
email: this.email,
53
-
amount: this.amount,
54
-
ref: this.ref,
51
+
key: this.key,
52
+
email: this.email,
53
+
amount: this.amount,
54
+
ref: this.ref,
55
55
metadata: this.metadata||{},
56
-
currency: this.currency||"NGN",
57
-
plan: this.plan||"",
58
-
quantity: this.quantity||"",
59
-
subaccount: this.subaccount||"",
60
-
transaction_charge: this.transaction_charge||0,
61
-
bearer: this.bearer||"",
56
+
currency: this.currency||"NGN",
57
+
plan: this.plan||"",
58
+
quantity: this.quantity||"",
59
+
subaccount: this.subaccount||"",
60
+
transaction_charge: this.transaction_charge||0,
61
+
bearer: this.bearer||"",
62
62
callback: (res)=>this.callback.emit(res),
63
63
onClose: ()=>this.close.emit(),
64
64
}
65
65
}
66
66
ngOnInit(){
67
-
if(this.text){
68
-
console.error("Paystack Text input is deprecated. Add text into textnode like so <angular4-paystack>Pay With Paystack</angular4-paystack>")
67
+
if(this.text){
68
+
console.error("Paystack Text input is deprecated. Add text into textnode like so <angular4-paystack>Pay With Paystack</angular4-paystack>")
0 commit comments