Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiException on live server #7

Open
kingstuffy opened this issue Feb 26, 2017 · 10 comments
Open

ApiException on live server #7

kingstuffy opened this issue Feb 26, 2017 · 10 comments

Comments

@kingstuffy
Copy link

I got the following error when using the library on a live server even though it works locally on my system. All resource method returns the same error.

`Yabacon\Paystack\Exception\ApiException

Paystack Request failed with response: '

<title>400 Bad Request</title>

400 Bad Request


cloudflare-nginx `
@ibrahimlawal
Copy link
Member

@kingstuffy what version of the library are you using?

@kingstuffy
Copy link
Author

kingstuffy commented Feb 26, 2017

@ibrahimlawal v2.1, installed via composer

@ibrahimlawal
Copy link
Member

@kingstuffy this was because the originating server didn't send valid data to our API. We built in a file_get_contents fallback which is really non-standard and will only work on some servers. Future versions might remove this fallback

@gofaniyi
Copy link

@ibrahimlawal faced with this problem, (action: trying to verify transaction using ref_no).
Running PHP 5.5.12, OpenSSL 1.0.2, Curl 7.36.0

image

@ibrahimlawal
Copy link
Member

I'm pushing an update that allows you disable the file_get_contents fallback. Please do that like so:

Yabacon\Paystack::disableFileGetContentsFallback()

And let me know what the error message is.

@ibrahimlawal ibrahimlawal reopened this Mar 29, 2017
@gofaniyi
Copy link

@ibrahimlawal Trying the Library v2.1.16. See error message.

"Curl failed with response: 'SSL certificate problem: unable to get local issuer certificate'."

@ibrahimlawal
Copy link
Member

Great, this should help: unicodeveloper/laravel-paystack#14 (comment)

@ibrahimlawal
Copy link
Member

@gofaniyi let me know if this works for you.

@gofaniyi
Copy link

@ibrahimlawal This (unicodeveloper/laravel-paystack#14 (comment)) resolves the problem at hand. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants