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

feat: allow paystack options as argument in initialize function #94

Conversation

kadetXx
Copy link
Contributor

@kadetXx kadetXx commented Dec 17, 2023

initializePayment function now takes in an optional paystackProps argument as a config param. Props passed in the function's config param will overwrite props passed in the usePaystackPayment Hook.

In hook config options, only the publicKey prop is mandatory since it doesn't change and will be a pain to pass in on every invocation of the initializePayment function. In initializePayment config options, publicKey is omitted.

Fixes issue #78

BREAKING CHANGES: initializePayment function now takes in an object with onClose, onSuccess and config as keys rather than as individual arguments. This ensures all three props can in any order or omitted since they are all optional.

@iamraphson iamraphson merged commit 327f9fd into iamraphson:master Jan 4, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants