Skip to content

Unsupported Apple event types result in errors #416

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

Closed
sireika opened this issue Jun 11, 2024 · 1 comment · Fixed by #417
Closed

Unsupported Apple event types result in errors #416

sireika opened this issue Jun 11, 2024 · 1 comment · Fixed by #417
Assignees
Labels
Bug Something isn't working

Comments

@sireika
Copy link

sireika commented Jun 11, 2024

Liap version(s) affected

1.12.0

Description

For example, when a one-time purchase is made, Apple sends a server notification with the type ONE_TIME_CHARGE. When this happens, LIAP's EventFactory class constructs a class name based on the notification type, even if that type isn't supported and the class doesn't actually exist. This ends up filling the logs with errors about these missing classes. This is confusing since unsupported event types ideally shouldn't trigger log-polluting exceptions.

How to reproduce

  1. Trigger a one-time purchase for Apple to send a server notification to your webhook endpoint with the type ONE_TIME_CHARGE
  2. Check your logs

Possible Solution

No response

Additional Context

[2024-06-10 23:55:57] development.ERROR: Class "Imdhemy\Purchases\Events\AppStore\OneTimeCharge" not found {"exception":"[object] (Error(code: 0): Class \"Imdhemy\\Purchases\\Events\\AppStore\\OneTimeCharge\" not found at /var/www/html/vendor/imdhemy/laravel-purchases/src/Events/EventFactory.php:51)

@imdhemy
Copy link
Owner

imdhemy commented Jun 11, 2024

@sireika Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants