#BUG - Payment Could not find a payment provider with id: xxxx

14 messages · Page 1 of 1 (latest)

spare summit
#

Hi,

I’m trying to migrate the Klarna module to MedusaJS 2.0, and I believe there might be a bug when creating a new payment provider module in the backend.

Currently, I have my module imported using the new architecture, and the database now contains the new payment provider ID in the table.

However, the backend is returning the error: Could not find a payment provider with id: pp_klarna_klarna when I call the endpoint /store/payment-collections/pay_col_01JDHCVTVF3XAJR05RN0C3ZVV2/payment-sessions, using provider_id: "pp_klarna_klarna"

As far as I can see, the payment provider is enabled, created in the database, and activated in the admin panel.

How can I resolve this issue?

Thank you!

spare summit
spare summit
#

Bump

spare summit
#

Bump

spring lily
#

Github issue please

spare summit
#

there is a github issue created with this topic

sacred isle
#

@spare summit I am having same problem, can you post link to github issue or any solution you may have found?

alpine ore
#

yeah I got this issue as well

#

but no solution currently

sacred isle
# alpine ore but no solution currently

i made an issue on the medusa github and they got back to me. apparently the displayed error is not printing the actual error, just a generic message you see. in my case it was caused because my custom payment provider implemented a third-party client, which even though it was following the BrandService example, is actually the incorrect way of implementing it.

#

if you have a custom client you implement in the payment provider which injects the dependency container in the constructor of the client, do not implement it this way. instead just pass the module option, which are injected into the main service of the custom payment provider, to create a new instance of the client within the constructor.

alpine ore
#

can you share the link pointing to the github issue? @sacred isle

#

wait, I found it

sacred isle