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

PaymentService not available for import in the event subscriber #7050

Open
dmiric opened this issue Apr 10, 2024 · 2 comments
Open

PaymentService not available for import in the event subscriber #7050

dmiric opened this issue Apr 10, 2024 · 2 comments
Labels
status: wontfix This will not be worked on

Comments

@dmiric
Copy link

dmiric commented Apr 10, 2024

I'm trying to use PaymentService.event.UPDATE in a subscriber. However I can't import it same way I can ProductService or OrderService.
I'm not sure if that's a bug or documentation is wrong?
PayementService:

UPDATED: "payment.updated",

@olivermrbl
Copy link
Contributor

olivermrbl commented Apr 16, 2024

I am not sure I understand what you mean. Can I get you to elaborate?

You can reference these events in two ways 1) as a raw string or 2) using the static property (as you allude to).

.subscribe("payment.updated", ....)
.subscribe(PaymentService.Events.UPDATED, ....)

@olivermrbl olivermrbl added status: wontfix This will not be worked on and removed status: needs triaging type: bug labels Apr 16, 2024
@dmiric
Copy link
Author

dmiric commented Apr 21, 2024

I tried using this example to make a subscriber:
https://github.com/medusajs/medusa-starter-default/tree/master/src/subscribers
for some reason when I try to replace ProductService with PaymentService it can not be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants