Open mikebronner opened 5 years ago
On my end I can confirm that the webhook is not working for me in Cashier 10 at all in production, but is working in test. Perhaps in issue with environment flags in the new version of Cashier?
Also, only payment succeeded events are working.
I'm triggering events using the Stripe CLI command stripe trigger payment_intent.succeeded
. Then I ran stripe trigger customer.subscription.created
to test subscription creation.
In another terminal I'm running stripe --forward-to https://[TEST_SERVER_URL]/genealabs/laravel-mixpanel/stripe
to monitor the output. Nothing seems to fail, but I don't see anything in Mixpanel.
2020-05-02 13:38:56 --> charge.succeeded [evt_1GeJgJHNhGeWA3jfdROenD4u]
2020-05-02 13:38:56 --> payment_intent.created [evt_1GeJgKHNhGeWA3jfHpseGxmD]
2020-05-02 13:38:57 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJgJHNhGeWA3jfdROenD4u]
2020-05-02 13:38:57 --> payment_intent.succeeded [evt_1GeJgKHNhGeWA3jfDjT80jlK]
2020-05-02 13:38:57 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJgKHNhGeWA3jfHpseGxmD]
2020-05-02 13:38:57 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJgKHNhGeWA3jfDjT80jlK]
2020-05-02 13:42:35 --> payment_method.attached [evt_1GeJjoHNhGeWA3jfrpUjcOm5]
2020-05-02 13:42:36 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJjoHNhGeWA3jfrpUjcOm5]
2020-05-02 13:42:37 --> plan.created [evt_1GeJjoHNhGeWA3jfRxiSocbg]
2020-05-02 13:42:37 --> invoice.finalized [evt_1GeJjrHNhGeWA3jfu4HthcZx]
2020-05-02 13:42:37 --> invoice.payment_succeeded [evt_1GeJjsHNhGeWA3jfOqsOrksV]
2020-05-02 13:42:37 --> customer.subscription.created [evt_1GeJjsHNhGeWA3jfPqt8SCF4]
2020-05-02 13:42:37 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJjoHNhGeWA3jfRxiSocbg]
2020-05-02 13:42:37 --> payment_intent.succeeded [evt_1GeJjsHNhGeWA3jfV4WWPCK0]
2020-05-02 13:42:37 --> payment_intent.created [evt_1GeJjsHNhGeWA3jf6in1sMym]
2020-05-02 13:42:37 --> customer.created [evt_1GeJjoHNhGeWA3jfNyfKohzw]
2020-05-02 13:42:38 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJjrHNhGeWA3jfu4HthcZx]
2020-05-02 13:42:38 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJjsHNhGeWA3jfOqsOrksV]
2020-05-02 13:42:38 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJjsHNhGeWA3jfPqt8SCF4]
2020-05-02 13:42:38 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJjsHNhGeWA3jf6in1sMym]
2020-05-02 13:42:38 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJjsHNhGeWA3jfV4WWPCK0]
2020-05-02 13:42:38 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJjoHNhGeWA3jfNyfKohzw]
2020-05-02 13:49:20 --> customer.source.created [evt_1GeJqNHNhGeWA3jfmcAYp4QI]
2020-05-02 13:49:20 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqNHNhGeWA3jfmcAYp4QI]
2020-05-02 13:49:20 --> customer.created [evt_1GeJqNHNhGeWA3jfDxlVjCP0]
2020-05-02 13:49:20 --> plan.created [evt_1GeJqNHNhGeWA3jf8BwcPeB9]
2020-05-02 13:49:20 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqNHNhGeWA3jfDxlVjCP0]
2020-05-02 13:49:21 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqNHNhGeWA3jf8BwcPeB9]
2020-05-02 13:49:22 --> charge.succeeded [evt_1GeJqPHNhGeWA3jfidHXyoLo]
2020-05-02 13:49:22 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqPHNhGeWA3jfidHXyoLo]
2020-05-02 13:49:22 --> customer.updated [evt_1GeJqPHNhGeWA3jf8ENCRI1y]
2020-05-02 13:49:22 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqPHNhGeWA3jf8ENCRI1y]
2020-05-02 13:49:22 --> invoice.created [evt_1GeJqQHNhGeWA3jfBm5GwXYn]
2020-05-02 13:49:23 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqQHNhGeWA3jfBm5GwXYn]
2020-05-02 13:49:23 --> payment_intent.succeeded [evt_1GeJqRHNhGeWA3jff0iRFgss]
2020-05-02 13:49:23 --> payment_intent.created [evt_1GeJqRHNhGeWA3jfYSm3bj9G]
2020-05-02 13:49:23 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqRHNhGeWA3jff0iRFgss]
2020-05-02 13:49:23 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqRHNhGeWA3jfYSm3bj9G]
2020-05-02 13:49:31 --> payment_method.attached [evt_1GeJqNHNhGeWA3jfMMtLI0CQ]
2020-05-02 13:49:31 --> invoice.finalized [evt_1GeJqQHNhGeWA3jfbdkDRU6p]
2020-05-02 13:49:32 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqNHNhGeWA3jfMMtLI0CQ]
2020-05-02 13:49:32 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqQHNhGeWA3jfbdkDRU6p]
2020-05-02 13:49:32 --> customer.subscription.created [evt_1GeJqQHNhGeWA3jfUOv3hZq1]
2020-05-02 13:49:32 --> invoice.payment_succeeded [evt_1GeJqQHNhGeWA3jfv5qE7lXF]
2020-05-02 13:49:32 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqQHNhGeWA3jfUOv3hZq1]
2020-05-02 13:49:32 <-- [204] POST https://[TEST SERVER URL]/genealabs/laravel-mixpanel/stripe [evt_1GeJqQHNhGeWA3jfv5qE7lXF]
Here is my test website in Mixpanel (freshly wiped):
No sign of the subscription creation.
The package is otherwise working in production, I can use the API. I use it to update charges manually, which I would prefer not to do.
@aakarim Thanks for the update!
I have fixed this by specifying the right model to look for a Cashier billable under. #90
It is possible that cashier endpoints are no longer working correctly. The Cashier API may have changed.
Create integration tests for these.