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

Stripe webook error - missing metadata #40

Open
djformby opened this issue Nov 15, 2024 · 0 comments
Open

Stripe webook error - missing metadata #40

djformby opened this issue Nov 15, 2024 · 0 comments

Comments

@djformby
Copy link

https://github.com/alexmorrisnz/moodle-paygw_stripe/blame/7753914973011e45aa03f88a8bd6483c07e1d1fa/webhook.php#L45

When a user cancels a subscription, everything appears to work correctly, but in the background it looks like Stripe sends a webhook event to the Moodle endpoint and it gets an error referencing this line. It appears to be expecting a 'metadata' json object that is not actually sent with the event. The "product" in Stripe does not have any metadata, so I'm guessing something didn't create the product correctly with the expected metadata?

I see that we can manually edit metadata in Stripe, but I'm not sure where to find all the fields (component, paymentarea, and itemid) that it appears to be expecting

Exception - core_payment\helper::get_gateway_configuration(): Argument #1 ($component) must be of type string, null given, called in [dirroot]/payment/gateway/stripe/webhook.php on line 45

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

No branches or pull requests

1 participant