Subscribing to development plans with Mantle
I know this is partly a Mantle thing, but I suspect my issue is that I'm not handling this scenario in a way that is compatible with what Gadget is expected. I've worked with the Gadget AI a bit but didn't get it resolved.
When someone subscribes to a Development plan through Mantle, it does not return a
confirmationURL
property, so I've been trying to either use open()
or location.reload()
to handle the scenario. With the later, sometimes it works and sometimes I get my unauthenticated page.
I suspect this is some kind of race condition with something happening in the backend that the frontend is not ready, or maybe I'm really missing what is happening.
Here's a sample of my code, would love some help to put me in the right direction:
What am I doing wrong?3 Replies
Hello,
This doesn't sound like a race condition or something wrong with Gadget. The Mantle hook is the one that takes care of all the requests and getting you the confirtmation URL. I would recommend reaching out to them to see what might be wrong. Have you also double checked your implementation? I would recommend taking a look at Mantle's Gadget use case tutorial
I'll reach out to them. My implementation is nearly a clone of their documentation with these conditional checks due to the errors I was seeing.
Do you like this answer?