laravel-paystack icon indicating copy to clipboard operation
laravel-paystack copied to clipboard

400 Bad Request Error while initialising Transaction

Open bytesfield opened this issue 5 years ago • 5 comments

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 avatar Jun 22 '20 22:06 bytesfield

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

bytesfield avatar Jun 22 '20 22:06 bytesfield

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

chrisumanah avatar Jun 29 '20 20:06 chrisumanah

how can i fixed the above error

chrisumanah avatar Jun 29 '20 20:06 chrisumanah

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

bytesfield avatar Jun 29 '20 20:06 bytesfield

@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;
}

enhacudima avatar Jul 21 '22 17:07 enhacudima