Closed idoqo closed 6 years ago
I know this has been closed but since no reason was given for those who may stumble on this in future, here:
Paystack has public and secret test keys. The public key begins with pk_ while the secret key begins with sk_. Use the appropriate key and all will be will, be it in test mode or live.
composer dumpautoload -o
then clear Laravel config cache
It worked for me
I keep getting an
InvalidArgumentException: A Valid Paystack Secret Key must start with 'sk_'.
which seems to be happening because Paystack's test keys begin with 'pk' instead.Maybe we could update the checker code in the Paystack() constructor or find a better way to check for valid keys.
Steps to repeat: (Describe how the issue can be repeated by someone who is to work on it)