-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow creating Mollie payment links for orders for draft orders #2690
Comments
@michaelbromley This can be assigned to me |
@casperiv0 I know you are also using Mollie. I would like to hear your thoughts on the proposed implementation, since it also affects your project probably. |
We're indeed using the Mollie plugin, with the dynamic URLs feature 👀. The way we handle payments goes as following:
await fetchClientGraphQL(
createMolliePaymentIntentMutationDocument,
{
locale: options.locale,
variables: {
input: {
molliePaymentMethodCode: options.code,
paymentMethodCode: options.paymentMethodCode,
// Generated by us using the storefront's URL and some additional information in search params & actual redirect URL
redirectUrl: options.redirectUrl,
},
},
},
);
I see no major breaking changes in your proposal and could possibly be useful for us too in the future. When handling a payment intent in the admin UI, I'm guessing it would then use the |
Thanks for the quick response 🙏 It should indeed not break anything.
Admin UI will not have an input field to pass redirect as argument, so it would indeed fall back to nr. 2 |
@martijnvdbrug I just saw the UI part is missing currently. We could do that together with #2903 unless you already have the UI part done and could provide a PR for that. |
@dlhck would be great if that can be picked up in that admin ui task. I'm always struggling with admin ui stuff... |
Is your feature request related to a problem? Please describe.
As an Administrator, I would like to be able to generate payment links for draft orders from the admin UI.
Describe the solution you'd like
After creating a draft order, I would like to be able to send my customer a payment link, to finalize the order. Currently, the shop-api mutation is depending on the active order, but for an admin it would be nice to pass an orderId.
createPaymentLink
createMolliePaymentIntent(orderId)
Current situation
Currently there are 2 ways to configure the Mollie plugin: Make the client pass in a redirectUrl or set in in Vendure. The config
useDynamicRedirectUrl
enforces the use of one of these options. This option is marked for deprecation.Dynamic redirect url:
Or, non-dynamic redirect url:
And in Vendure UI you then specify the redirect url:
Proposed implementation
createMolliePaymentIntent(redirectUrl: "some-url")
createPaymentIntent
button in the Admin UI. Otherwise the admin would have to specify a redirect URL everytime the button is clicked.Proposed changes:
useDynamicRedirectUrl
. It's already deprecated right nowredirectUrl
tofallbackRedirectUrl
createMolliePaymentIntent("some-redirect")
it always takes precedence over the fallback URLThe text was updated successfully, but these errors were encountered: