Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

[FEATURE] Seperate payment-redirect and order-success #1419

Closed
niklaswolf opened this issue Apr 7, 2021 · 4 comments · Fixed by #1502
Closed

[FEATURE] Seperate payment-redirect and order-success #1419

niklaswolf opened this issue Apr 7, 2021 · 4 comments · Fixed by #1502
Assignees

Comments

@niklaswolf
Copy link
Collaborator

niklaswolf commented Apr 7, 2021

Description

Right now it is very confusing for the customer, because without paying the order one sees the order success page. Only there one gets redirected after some time to the payment provider. This is really confusing and has a very high potential of customers aborting the order.

I suggest the following flow:

  1. createOrder()
  2. getOrderPaymentUrl()
    2.1. If paymentUrl (external payment) --> redirect directly to paymentUrl
    2.1.1. If payment succeeds --> redirect to order success
    2.1.2. If payment fails --> redirect to order/payment failure to handle error seperately
    2.2. Else (internal payment) --> redirect to order success

paymentFlow

Benefits

  • much clearer payment flow
  • potential of aborting the order out of confusion on the "first" order-success page eliminated
  • seperation of concerns: orderDetails component does not have to handle payment redirect and order/payment errors

Related

#781
#1411

@mkucmus
Copy link
Collaborator

mkucmus commented Apr 7, 2021

thanks @niklaswolf for that flow 💪🏻
I've got some questions regarding that case when paymentUrl exists to have better understanding.

do you suggest that we need to perform redirection immediately (no await) after getting the external payment url, and after all get customer back on success page when it's paid?

We would have sth like:

  • placed order for external payment gateway does not mean success if it's not paid yet
  • no paid order (on failure in external gateway) redirects customer for fails page with information about the order with additional info about failed payment
  • customer receives an email once order is placed anyway (?)

@niklaswolf
Copy link
Collaborator Author

niklaswolf commented Apr 7, 2021

do you suggest that we need to perform redirection immediately (no await) after getting the external payment url, and after all get customer back on success page when it's paid?

yes that's what we think is the expected behaviour. The customer otherwise is confused, because he knows he still has to pay the order, but already sees an order confirmation page. The customer doesn't (and don't has to) care about the technicals (order is already created in shopware before even paying). For the customer the order is finished successfully after paying for it.

placed order for external payment gateway does not mean success if it's not paid yet

correct

no paid order (on failure in external gateway) redirects customer for fails page with information about the order with additional info about failed payment

correct

customer receives an email once order is placed anyway (?)

This can and should be configured in shopware (Settings -> Business events), the order confirmation mail can be sent only after payment success for external payments. But that's no concern of the PWA, but should be mentioned in the docs I think.

@niklaswolf
Copy link
Collaborator Author

@mkucmus will this be part of the next release? Seems like others also think this is a good idea :)
Furthermore I have to plan our next steps for our projects and therefore I'd like to know if we should implement it ourselves or if we can wait for the next release :)

@elkmod
Copy link
Collaborator

elkmod commented Apr 29, 2021

Hey @niklaswolf , I strongly support your suggested way of doing things and will make sure that it will be implemented.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants