Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class Angular4PaystackEmbedComponent implements OnInit {

constructor(private paystackService: Angular4PaystackService) {}

async pay() {
public async pay() {
let errorText = '';
if (this.paystackOptions && Object.keys(this.paystackOptions).length >= 2) {
errorText = this.valdateInput(this.paystackOptions);
Expand All @@ -57,14 +57,14 @@ export class Angular4PaystackEmbedComponent implements OnInit {
return '';
}

valdateInput(obj: PaystackOptions) {
private valdateInput(obj: PaystackOptions) {
if (!this.callback.observers.length) {
return 'ANGULAR-PAYSTACK: Insert a callback output like so (callback)=\'PaymentComplete($event)\' to check payment status';
}
return this.paystackService.checkInput(obj);
}

generateOptions(obj: PaystackOptions) {
private generateOptions(obj: PaystackOptions) {
this._paystackOptions = this.paystackService.getPaystackOptions(obj);
this._paystackOptions.onClose = () => {
if (this.onClose.observers.length) {
Expand All @@ -76,7 +76,7 @@ export class Angular4PaystackEmbedComponent implements OnInit {
};
}

async ngOnInit() {
public async ngOnInit() {
console.error(
'ANGULAR-PAYSTACK: The paystack embed option is deprecated. Please use the paystack component or directive'
);
Expand Down