Comments (5)
@iamnotstatic you need to pass in those callbacks to intializePayment
const PaystackButton = ({ text, className, children, onSuccess, onClose, ...others }: PaystackButtonProps): JSX.Element => { const initializePayment = usePaystackPayment(others); return ( <button className={className} onClick={(): void => initializePayment(onSuccess, onClose)}> {text || children} </button> ); };
the code sandbox link has been edited so you can understand better
from react-paystack.
Hey @Tooluloope you are suppose to pass two arguments into initializePayment() for the callback. Like this initializePayment(onSuccess, onClose)
. I have edited your codesandbox. Check it out.
from react-paystack.
Sorry for my late reply.
from react-paystack.
Callback functions not working
from react-paystack.
Requires callback to be passed to initializePayment
from react-paystack.
Related Issues (20)
- OnSuccess & OnClose Function not working HOT 7
- Security Vulnerabilities With Package HOT 6
- Add disabled prop to PayStackButton HOT 2
- Paystack with sanity.io
- TypeScript support HOT 1
- Subscription Start Date HOT 1
- Could not resolve dependency npm install error HOT 1
- onSuccess not accepting props HOT 3
- Ok
- Passing payment options
- The `invoice.update` event isn't getting called in webhook HOT 1
- How do I properly set it up on Next Js HOT 3
- close paystack popup HOT 9
- Cannot load paystack inline script when using SharedArrayBuffer
- pass in access code to either Popup or Button to retrieves the transaction details, HOT 3
- Error when initialising paystack HOT 1
- Export Currency to be accessed by users
- Google Tag Inclusion in Package HOT 1
- why is the amount calculated in kobo HOT 4
- Version 5.0.0m not compatible with react 18.2.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-paystack.