unicodeveloper / laravel-paystack

:credit_card: :package: :moneybag: Laravel 6, 7, 8, 9, 10 and 11 Package for Paystack
https://paystack.co
MIT License
597 stars 310 forks source link

400 Bad Request Error while initialising Transaction #106

Open bytesfield opened 4 years ago

bytesfield commented 4 years ago

I get the error below while initializing transaction.

GuzzleHttp\Exception\ClientException Client error: POST https://api.paystack.co/transaction/initialize resulted in a 400 Bad Request response: { "status": false, "message": "Invalid Amount Sent" }

bytesfield commented 4 years ago

I have fixed it. The hidden field of quantity is required. Which i added and it went

chrisumanah commented 4 years ago

Client error: POST https://api.paystack.co/transaction/initialize resulted in a 400 Bad Request response: { "status": false, "message": "Duplicate Transaction Reference" }

chrisumanah commented 4 years ago

how can i fixed the above error

bytesfield commented 4 years ago

Check how you are generating and sending your transRef. I guess their is a duplication somewhere.

enhacudima commented 2 years ago

@bytesfield you fixed the issue "Invalid Amount Sent" but you neet to push it bacause on v1.0.8 there missing $data parameter

Error public function getAuthorizationUrl(miss $data) { $this->makePaymentRequest(miss $data);

    $this->url = $this->getResponse()['data']['authorization_url'];

    return $this;
}