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.
initializePayment
function now takes in an optionalpaystackProps
argument as a config param. Props passed in the function's config param will overwrite props passed in theusePaystackPayment
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 theinitializePayment
function. IninitializePayment
config options, publicKey is omitted.Fixes issue #78
BREAKING CHANGES:
initializePayment
function now takes in an object withonClose
,onSuccess
andconfig
as keys rather than as individual arguments. This ensures all three props can in any order or omitted since they are all optional.