receiveSubscriptionPayment event never seems to fire?
We are using Stripe for Commerce plugin as a payment gateway, and have our own plugin that's listening on EVENT_RECEIVE_SUBSCRIPTION_PAYMENT as documented here: https://craftcms.com/docs/commerce/3.x/extend/events.html#receivesubscriptionpayment
Event::on(
Subscriptions::class,
Subscriptions::EVENT_RECEIVE_SUBSCRIPTION_PAYMENT,
function(SubscriptionEvent $event) {
LogToFile::info('Got into EVENT_RECEIVE_SUBSCRIPTION_PAYMENT on main plugin file', 'subscription-emails');
$this->emailsService->subscriptionReceivePayment($event); // works because of 'emailsService' => EmailsService::class
}
);
We are expecting that when Stripe processes a subscription payment, that it will fire off the webhook, that the Stripe for Commerce plugin will do its thing, Commerce will listen to that and then the EVENT_RECEIVE_SUBSCRIPTION_PAYMENT will fire, allowing us to send a "thanks for your subscription payment" email from our own plugin.
The event never seems to fire. We have never seen a log line in the subscription-emails log file for this event, only ever for the EVENT_AFTER_CREATE_SUBSCRIPTION event (also in our plugin, and working fine)
Are we missing something, or are none of the Subscription events other than EVENT_AFTER_CREATE_SUBSCRIPTION working?
We do have the webhooks set up to all send, and the webhook secret is in and valid.
Additional info
- Craft version: 3.6.11.2
- Commerce version: 3.2.17.4
- PHP version: 7.4.3
Has there been any movement on this?
Sorry, this slipped through our review. We are moving issues to discussions at the moment and this surfaced. Will review this in the morning.
Thanks Luke. Are there any updates addressing this issue?
@lukeholder Any update on this ?
I was able to reproduce the the event triggering on the payment event on the latest version of Commerce and Stripe plugin. Please create a new issue if this issue persists on the latest version of Commerce and the Stripe plugin.
Thanks.