faustbrian / laravel-paddle

DEPRECATED - USE https://github.com/laravel/cashier-paddle
Mozilla Public License 2.0
10 stars 2 forks source link

Laravel 7 integration hangs when adding the package #3

Closed petericebear closed 4 years ago

petericebear commented 4 years ago

With a Laravel 7 app I try to add the package with: composer require kodekeep/laravel-paddle

Then I get this error: image

I think the dependency needs to be updated of the sdk. Can you add that and trigger a new version?

faustbrian commented 4 years ago

Odd, I have it running in production with 2 applications on Laravel 7.

The paddle-sdk package supports Laravel 7 since 1.1.0 https://github.com/kodekeep/paddle-sdk/compare/1.0.0...1.1.0

petericebear commented 4 years ago

ah it has todo with KiteTail. When I install that it give the same error image

faustbrian commented 4 years ago

If you are on Laravel 7 you don't need Zttp but can use https://laravel.com/docs/7.x/http-client instead which is based on Zttp.

petericebear commented 4 years ago

I reverted to a couple of commits back (used laravel shift for the upgrade of the old app).

And before I ran composer update, I installed this package. Which kept tightenco/collect to a lower version. I have it installed now. But kitetail which needed from the sdk dependencies triggered the error somewhere along the way.

faustbrian commented 4 years ago

Oh sorry I misunderstood the Zttp issue. I'll upgrade the SDK to use the illuminate/http package instead.

faustbrian commented 4 years ago

@petericebear could you test https://github.com/kodekeep/laravel-paddle/releases/tag/1.3.0 and let me know if you encounter any issues? It now uses kodekeep/paddle-sdk:1.2.0 which uses illuminate/http instead of kitetail/zttp.

petericebear commented 4 years ago

This worked image

faustbrian commented 4 years ago

Great, let me know if you run into issues with the new illuminate/http usage. Things like failing requests or wrong results.

petericebear commented 4 years ago
dd(Paddle::subscription()->plans()->all());

KodeKeep/Paddle/Exceptions/RequestException with message 'Received unexpected response with status code 200.' I am trying through tinker and get this error. There are plans in Paddle available.

petericebear commented 4 years ago

And through tinkerwell I get this response:

image

faustbrian commented 4 years ago
dd(Paddle::subscription()->plans()->all());

KodeKeep/Paddle/Exceptions/RequestException with message 'Received unexpected response with status code 200.' I am trying through tinker and get this error. There are plans in Paddle available.

https://github.com/kodekeep/paddle-sdk/releases/tag/1.2.1

faustbrian commented 4 years ago

And through tinkerwell I get this response:

image

That looks like a syntax error if you are not on PHP 7.4

petericebear commented 4 years ago

I am on PHP 7.4.1 image

petericebear commented 4 years ago

OpCache is disabled

faustbrian commented 4 years ago

Are your php-fpm and php-cli both on PHP 7.4? Your php-fpm doesn't seem to have issues with executing the code but your CLI does.

Edit Just tested your exact command local and on a server with PHP 7.4. No issues executing it.

petericebear commented 4 years ago

Ah in tinkwell there was a link to 7.3.1. After that and updating the version for the SDK I now get the responses :D