1

I have an option where the client will pay an order after internal validation.

The client places the order with a custom payment method and then I restore the order for the client to pay.

What I'm trying to achieve is in this cases redirect the client to the final step of payment. here is the code.

$this->quoteRepository->save($new_quote); $this->checkoutSession->replaceQuote($new_quote); $this->checkoutSession->setQuoteId($new_quote->getid()); $this->cart->save(); $cartUrl = $this->url->getUrl('checkout/#payment/'); $resultRedirect = $this->resultRedirectFactory->create(); $resultRedirect->setUrl($cartUrl); return $resultRedirect; 

This will redirect to the payment step but then redirects me to a noroute page, can anybody help?

Thanks in advance !

1 Answer 1

2

Ok so, after some hours of digging up it all comes down to one line of code.

$this->_redirect('checkout', ['_fragment' => 'payment']); 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.