laravel / cashier-mollie

MIT License
376 stars 63 forks source link

Target [Laravel\Cashier\Coupon\Contracts\CouponRepository] is not instantiable. #81

Closed Jabirr closed 4 years ago

Jabirr commented 4 years ago

Hi

I have made a project where users can subscribe to a plan. Its working as intended on my local server and today I pushed it to my testing server. When ever i want to go to the checkout it will give me this error.

image

Its before i get on the mollie checkout page. And it seems to break at StartSubscription.php at line 62 image

Im wondering what is wrong since its not giving me this error on my local server.

regards, Jabir

RobertBoes commented 4 years ago

Have you created your own implementation of CouponRepository, like you asked for the PlanRepository in #69 ? If so, could you share the code where you're binding the CouponRepository and how your implementation looks like?

Jabirr commented 4 years ago

No i did not, in fact im not using coupons in my application at this moment. Thats why i am wondering why its not working. Is there something i have turned on while its asking for a coupon but it cant find one? And thus giving me this error?

sandervanhooft commented 4 years ago

First things first: can you check you're using the same versions in both environments?

Jabirr commented 4 years ago

Hi @sandervanhooft

They are both the same version "laravel/cashier-mollie": "^1.0",

sandervanhooft commented 4 years ago

Can you use composer show laravel/cashier-mollie to check the actual version installed?

The composer.json file will only show you what versions are allowed.

Jabirr commented 4 years ago

Yes, i did that, still the same version tho.

sandervanhooft commented 4 years ago

What version specifically?

Jabirr commented 4 years ago

V1.1.0 on both local and server.

sandervanhooft commented 4 years ago

Can you upgrade to the latest, on both machines?

sandervanhooft commented 4 years ago

We're at v1.2.3 currently

Jabirr commented 4 years ago

Updating to the newer versions seemed to fix the problem. Sorry for not realising earlier!

sandervanhooft commented 4 years ago

No problem, thanks for the follow-up!