dinkbit / conekta-cashier

Laravel + Conekta = Painless subscription billing. http://laravel.com
MIT License
34 stars 22 forks source link

PHP Error Call to undefined method: $user->subscription()->canceled() #37

Closed alfonsofernandezyf closed 6 years ago

alfonsofernandezyf commented 6 years ago

I get a call to undefined method error when using the $user->subscription()->canceled() method.

PHP Error: Call to undefined method Dinkbit\ConektaCashier\ConektaGateway::canceled() on line 1

sgtpepper9907 commented 6 years ago

I believe de method name is cancel
If you want to check if the user is subscribed (the account is not cancelled) you should use the method subscribed

  $user->subscription()->cancel();
  $user->subscribed(); // false
alfonsofernandezyf commented 6 years ago

I wanted to tell if a custumer had been subscribed and then cancelled. The method $user->cancelled() works fine.

Thank you.