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

Fixed tracking canceled subscription for Stripe #49

Merged
merged 1 commit into from
Oct 5, 2018

Conversation

Djuki
Copy link
Contributor

@Djuki Djuki commented Aug 31, 2018

Stripe API for Canceling subscription event send canceled_at field with a timestamp like this:

"canceled_at": 1534001486,

That is why line 94 in src/Http/Requests/RecordStripeEvent.php
'Churned' => (new Carbon($transaction['canceled_at']))->format('Y-m-d\Th:i:s'),

produces this error:

DateTime::__construct(): Failed to parse time string (1534001486) at position 8 (8): Unexpected character

Another issue is on line 97 when there is a call to an undefined function
and we get this error:

Call to undefined function GeneaLabs\LaravelMixpanel\Http\Requests\timestamp()
The error I mentioned in this issue: #48

This fix works with latest Stripe API.

@coveralls
Copy link

coveralls commented Aug 31, 2018

Coverage Status

Coverage remained the same at 26.59% when pulling 8267d20 on Djuki:master into 0771c08 on GeneaLabs:master.

@mikebronner mikebronner merged commit a0fb338 into mikebronner:master Oct 5, 2018
mikebronner added a commit that referenced this pull request Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants