0

I want to redirect to my external payment method after place order is Saved, I create an observer for event sales_order_place_after.

Inside execute I put this code

$this->responseFactory->create()->setRedirect($this->url->getUrl(//ExternalURL like http://localhost))->sendResponse();

but I get an error cors and I don't know how to fix or an alternative to redirect with dynamic variables inside URL like http://localhost/example?variable1=example

1 Answer 1

0

Please use below code

$this->responseFactory->create()->setRedirect(http://gohilrajesh.blogspot.com)->sendResponse();

hope this helps you :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.