Closed Dilpenny closed 4 years ago
this you use this Unicodeveloper\Paystack\Facades\Paystack; in your payment controller ??
@Dilpenny the message is clear now you public or private key is not valid
@bere6255 I am querying my keys from a database table then used Config::set ("variablename", value) to set the value of the keys on the paystack config file. This however give error 401. But when I copy and paste the same queried key directly to paystack config file the request fires with 200 status code.
@bere6255 I am querying my keys from a database table then used Config::set ("variablename", value) to set the value of the keys on the paystack config file. This however give error 401. But when I copy and paste the same queried key directly to paystack config file the request fires with 200 status code.
Best practice do not store keys in database use env files and ignore them from commit that will solve your problem
@bere6255 thanks for your response. But the situation here warrants the choice. Scenario: I have SaaS where different users represents a different business on my paystack account. These users have different keys as such I want payment going to individual business bank account. My best shot is to dynamical set keys before making API call.
Any other way of handling such case shall be appreciated.
@bere6255 thanks for your response. But the situation here warrants the choice. Scenario: I have SaaS where different users represents a different business on my paystack account. These users have different keys as such I want payment going to individual business bank account. My best shot is to dynamical set keys before making API call.
Any other way of handling such case shall be appreciated.
Handle all disbursement from a single account and manage all your business accounts internally, the you will be able to track when things go wrong for customer support
thanks for the heads up @bere6255. but I got it done by writing it to the environment variable the fetch the same from the config... that way, every client payment goes to her account under a business on the paystack platform.
thanks for the heads up @bere6255. but I got it done by writing it to the environment variable the fetch the same from the config... that way, every client payment goes to her account under a business on the paystack platform.
Soft🎉
Whenever i try to pay i get this error: Client error:
POST https://api.paystack.co/transaction/initialize
resulted in a401 Unauthorized
response: { "status": false, "message": "Invalid key" }