-
Hi, when receiving the DID_CHANGE_RENEWAL_STATUS event, how do you know if it is auto-renewing or not? I did not find any methods or properties on the PurchaseEventContract. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @lahivee , Firstly, Kindly, check the following links to find the correct event to handle: To handle the subscription auto-renewal:For Google, I suggest using SUBSCRIPTION_RENEWED:
For Apple, I suggest using DID_RENEW and INTERACTIVE_RENEWAL. Check the provided links for more information.
DID_CHANGE_RENEWAL_STATUSApple says,
Make sure you are using Inside your event listener class DidChangeRenewalStatusListener
{
/**
* @param DidChangeRenewalStatus $event
*/
public function handle(DidChangeRenewalStatus $event): void
{
$isAutoRenewal = $event->isAutoRenewal();
$changeDate = $event->getAutoRenewStatusChangeDate();
// ...
}
} |
Beta Was this translation helpful? Give feedback.
Hi @lahivee ,
Firstly,
The event names are named after the notification types named by each provider.
Google does not send a
DID_CHANGE_RENEWAL_STATUS
notification, but Apple does, as shown in the configuration section.Kindly, check the following links to find the correct event to handle:
To handle the subscription auto-renewal:
For Google, I suggest using SUBSCRIPTION_RENEWED:
For Apple, I suggest using DID_RENEW and INTERACTIVE_RENEWAL. Check the provided links for more information.