Plaid-Constructor objects, class functions is not working in callback function


#1

In Plaid callback function, onSuccess() is not allowing constructor objects, class functions etc.
If I make flag it value changes automatically and got undefined.

this.linkHandler = Plaid.create({
      clientName: 'Plaid Walkthrough Demo',
      env: 'sandbox',
      key: 'ae7d73d5655a32f692074e5f577616',
      product: ['transactions'],
      webhook: 'https://requestb.in',
      selectAccount: true,
      forceIframe: true,
      onLoad: function() {
        console.log('loaded usman');
      },
      onSuccess: function(public_token, metadata) {
        console.log("success",public_token);
        console.log("meta data", metadata.account.id, "account name", metadata.account.name);
        let plaid_local = {"public_token":public_token,"account_id":metadata.account.id,"account_name":metadata.account.name};
        this.plaid_data = plaid_local;
        this.plaid_data = JSON.stringify(this.plaid_data);
        
        this.plaid_flag = true;
        console.log(this.plaid_data)
        console.log(this.plaid_flag,"insucess");
        this.sendtoken(); //error function is undefined
      },
      onExit: function(err, metadata) {
        if (err != null) {
          console.log(err);
        }
        console.log(metadata);
        console.log(metadata.institution.name, metadata.institution.institution_id);
        console.log(metadata.request_id)
      }
    });