-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat(demo): add payment form (unzer payment integration) #671
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
CodSpeed Performance ReportMerging #671 will not alter performanceComparing Summary
|
hey @itscark! thank you for providing a PR. Here's a little update from our side: we are about to check it out but still need the creadentials for test unzer account to run it in entire flow. I asked for an account and it just can take a while. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! thank you very much for a great PR!
I've checked twice and ran into a problem only with missing unzer instance (or sth related) so I suggested two solutions for that.
anyway, the overall is really great and using a dynamic import for component relying on its name in the backend is a good move 💪🏼
I was able to finish the flow and it worked 💙
|
||
if (creditCard.value !== null) { | ||
try { | ||
const response: { id: string } = await creditCard.value.createResource(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
onBeforeMount(() => { | ||
useHead({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attaching the unzer.js script is too lazy. It's not being loaded in the test env: https://stackblitz.com/edit/github-c9t5on?file=nuxt.config.ts (backend is temporary, we can talk about it in DM later on)
it causes the error in here: https://github.com/shopware/frontends/pull/671/files#diff-a73f8d424b5c2834bf69de34a0cd276893eb9a66a9a84ef96553079f816ab0e1R49
I can see two solutions for that:
- I would wrap useHead things in a function and export it in the composable to be used directly in the setup function of the component - then run it in
onBeforeMount
lifecycle hook in a component. - use a plugin (server + client) to register a script for specific page, in client plugin initialize the unzer instance
wdyt?
Description
PR for 568