Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programmatically call function to pay #15

Closed
SanchezQb opened this issue Jul 3, 2019 · 2 comments
Closed

Programmatically call function to pay #15

SanchezQb opened this issue Jul 3, 2019 · 2 comments

Comments

@SanchezQb
Copy link

SanchezQb commented Jul 3, 2019

Is there a way to call a click function on the pay button without actually clicking it?
The reason is that I'm getting the paystack key and email from an API and I want to be able to call a function to pay without clicking a different button. This is what I've tried...

<PaystackButton key="pay" text={this.state.info} ref={(payRef) => this.payRef = payRef} class="payButton" callback={this.callback} close={this.close} embed={false} reference={this.state.ref} email={this.state.email} amount={parseInt(this.state.amount)} paystackkey={this.state.p_key} tag="button" />
Then I'm calling this.payRef.payWithPaystack() but my state values are empty

@felixiho
Copy link

felixiho commented Jan 2, 2020

@SanchezQb Were you able to get around this?
If yes how?

@bodfaj13
Copy link

bodfaj13 commented Jan 8, 2021

anybody found a way around this yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants