Search code examples
spartacus-storefront

External payment redirects customer via post-request to webshop-url


In our scenario we use an external payment provider. We send a request via sap commerce to the payment provider and receive an url to which the customer is forwarded. After the shop customer has entered the payment data on this external page and the payment has been completed, the redirection to the Web shop should take place. Unfortunately, we cannot redirect the shop customer directly to a spartacus page because the request contains form data, so it is a POST request.

What is the recommended spartacus way for this usecase?


Solution

  • We faced the same problem and solved it on the Node-server that we use for server-side rendering. We handle the post request in the express app (e.g. saving the payment token) and then redirected to another URL