yii2mod / yii2-cashier

Yii2 Cashier provides an interface to Stripe's subscription billing services.
MIT License
45 stars 23 forks source link

Unable to subscribe to plan when the customer is deleted from stripe dashboard. #9

Closed nomaan-alkurn closed 6 years ago

nomaan-alkurn commented 6 years ago

Hi,

Thanks for the extension. Facing an issue when the customer is deleted from stripe dashboard. Receiving the following error when I try to create a new subscribe as it is not reflected in our database: Call to a member function create() on null in /home/alkurnw1/public_html/clients/service-for-you-app/vendor/yii2mod/yii2-cashier/SubscriptionBuilder.php:179

We need to check the customer exist at stripe dashboard in getStripeCustomer function at this line https://github.com/yii2mod/yii2-cashier/blob/ddd8cf8bd077d75c799d1114355ae47523c34070/SubscriptionBuilder.php#L212

ihorchepurnyi commented 6 years ago

Hi, thanks for the issue. I will check it on this week.

ihorchepurnyi commented 6 years ago

Also, you can create PR to resolve this issue.

nomaan-alkurn commented 6 years ago

Hi @igor-chepurnoi , I will also check at my end and create a PR.

ihorchepurnyi commented 6 years ago

Hi @nomaan-alkurn , Thanks!