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

Cannot initialize Stripe frontend #172

Open
ghidosoft opened this issue Oct 17, 2024 · 3 comments
Open

Cannot initialize Stripe frontend #172

ghidosoft opened this issue Oct 17, 2024 · 3 comments

Comments

@ghidosoft
Copy link

Hello, I'm integrating Stripe PSP with CommerceTools. I installed this connect via the marketplace and configured it, the webhook appears correctly updated in my Stripe dashboard. I added the connector to my CT app and in the checkout config.

However I cannot get the frontend to display the Stripe payment widget and I get these errors:

image

image

Looking in the code it appears that publishableKey is missing in the enabler. How can I configure this value? This variable is missing in the connect.yml file and I could not find it either in the documentation.

Thanks in advance.

@aaronmezarguez
Copy link
Collaborator

aaronmezarguez commented Nov 5, 2024

Hi Ghidosoft,

When you refer to the checkout configuration, are you talking about the checkout from commercetools? If so, please note that this version was created before commercetools accepted the Drop-in components.

For the current version, this checkout is designed for composable solutions where you manage your own checkout process. You can render the payment methods you have available on Stripe, such as the Payment Element and Express Checkout. To enable this setup, create the enabler using the following values:

setEnabler(new Enabler({
    publishableKey: STRIPE_PUBLISHABLE_KEY,
    processorURL: processorUrl,
    returnURL: "",
    sessionId
}));

You can find an example of how to implement the current connector in a Composable solution at https://github.com/gluo-dev/commercetools-stripe-connect-payment-example-site.

Regarding the Drop-in features, we are still in the development phase. We appreciate your patience as we work on integrating the connector into the checkout environment from commercetools seamlessly.

Best regards.

@ghidosoft
Copy link
Author

Hi Aaron,

Thank you for your answer!

Yes, we are indeed using Commercetools Checkout, specifically through the one-click installation available in the Merchant Center. Because of this setup, we don’t have the capability to create an Enabler as described, nor can we customize this aspect of the checkout. Instead, we are utilizing the checkoutFlow method provided by the official @commercetools/checkout-browser-sdk package to handle the checkout process as described in the Commercetools SDK documentation at https://docs.commercetools.com/checkout/sdk#checkoutflow-method

Please let us know if there’s any guidance available under this configuration.

Best regards,
Andrea

@aaronmezarguez
Copy link
Collaborator

aaronmezarguez commented Nov 7, 2024

Hi Andrea,

Thanks for reaching out!

When the connector was initially developed, commercetools didn’t support the drop-in feature, and Stripe’s integration relies on this drop-in functionality with the Payment Element. Currently, the connector isn’t equipped to operate within the commercetools Checkout environment. However, we’re actively working on developing this feature to fully integrate Stripe into the commercetools Checkout setup.

If you'd like, I can notify you when the connector for commercetools Checkout becomes available.

Best regards,
Aaron

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

2 participants