{"action":"created","issue":{"url":"https://api.github.com/repos/thephpleague/omnipay/issues/255","labels_url":"https://api.github.com/repos/thephpleague/omnipay/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/omnipay/issues/255/comments","events_url":"https://api.github.com/repos/thephpleague/omnipay/issues/255/events","html_url":"https://github.com/thephpleague/omnipay/issues/255","id":66831249,"number":255,"title":"Sagepay server and redirectionURL","user":{"login":"JoSquiders","id":6805808,"avatar_url":"https://avatars.githubusercontent.com/u/6805808?v=3","gravatar_id":"","url":"https://api.github.com/users/JoSquiders","html_url":"https://github.com/JoSquiders","followers_url":"https://api.github.com/users/JoSquiders/followers","following_url":"https://api.github.com/users/JoSquiders/following{/other_user}","gists_url":"https://api.github.com/users/JoSquiders/gists{/gist_id}","starred_url":"https://api.github.com/users/JoSquiders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoSquiders/subscriptions","organizations_url":"https://api.github.com/users/JoSquiders/orgs","repos_url":"https://api.github.com/users/JoSquiders/repos","events_url":"https://api.github.com/users/JoSquiders/events{/privacy}","received_events_url":"https://api.github.com/users/JoSquiders/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-07T09:04:03Z","updated_at":"2015-04-07T13:57:03Z","closed_at":null,"body":"I'm getting error: 5006 Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.\r\n\r\nI'm trying to connect to Sagepay Server and am setting 'returnUrl' but it is never hitting the URL I specify here. It does successfully connect to Sagepay and I go through the test payment all okay. I receive the error when clicking pay now. I know Sagepay works a bit different from the other gateways but I don't know what I'm missing.\r\n\r\nMy code looks like:\r\n```\r\npublic function index()\r\n        {\r\n//the function where I initially start the payment process\r\n\t\t\t$this->params = array(\r\n                'description'=> 'Online order',\r\n                'currency'=> 'GBP',\r\n                'transactionId'=> $this->orderNo,\r\n                'amount'=> '10.00'\r\n            );\r\n\r\n            \r\n            $this->params['returnUrl'] = site_url('/checkout/payment-gateway-process/' . $this->orderNo) .  '/';\r\n\t\t\t\r\n\t\t\t\r\n            $this->params['card'] = array(\r\n                'firstName' => 'xxx\r\n            );\r\n\r\n            \r\n            try {\r\n                $response = $this->gateway->purchase($this->params)->send();\r\n\r\n               \r\n                if ($response->isSuccessful()) :\r\n                  \r\n                    redirect('/checkout/payment-gateway-success/' . $this->orderNo);\r\n\r\n                elseif ($response->isRedirect()) :\r\n\r\n                    $response->redirect();\r\n                else :\r\n                    \r\n\r\n                endif;\r\n\r\n            } catch (\\Exception $e) {\r\n\r\n            }\r\n            \r\n\r\n        }\r\n\r\n\r\n\r\n\tpublic function process_payment($orderNo)\r\n        {\r\n        //the function that should be called by Sagepay after payment has been made, i.e., the returnURL\r\n// it never reaches this function\r\n              $this->params = array(\r\n                'description'=> 'Online order',\r\n                'currency'=> 'GBP',\r\n                'transactionId'=> $orderNo,\r\n                'amount'=> '10.00'\r\n            );\r\n\r\n            $this->params['card'] = array(\r\n                'firstName' => 'xxx'\r\n            );\r\n\r\n           \r\n            $response = $this->gateway->completePurchase($this->params)->send();\r\n\r\n            if ($response->isSuccessful()) :\r\n\r\n                $response->confirm();\r\n                redirect('/checkout/payment-gateway-success/' . $orderNo);\r\n            endif;\r\n\r\n     }\r\n```\r\n\r\nI have cut out some of it to make it readable but the $orderNo and 'card' parameters are set (I've only put firstName here but I do send all the details). I initiate the Omnipay Sagepay server instance in the __construct."},"comment":{"url":"https://api.github.com/repos/thephpleague/omnipay/issues/comments/90562941","html_url":"https://github.com/thephpleague/omnipay/issues/255#issuecomment-90562941","issue_url":"https://api.github.com/repos/thephpleague/omnipay/issues/255","id":90562941,"user":{"login":"JoSquiders","id":6805808,"avatar_url":"https://avatars.githubusercontent.com/u/6805808?v=3","gravatar_id":"","url":"https://api.github.com/users/JoSquiders","html_url":"https://github.com/JoSquiders","followers_url":"https://api.github.com/users/JoSquiders/followers","following_url":"https://api.github.com/users/JoSquiders/following{/other_user}","gists_url":"https://api.github.com/users/JoSquiders/gists{/gist_id}","starred_url":"https://api.github.com/users/JoSquiders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoSquiders/subscriptions","organizations_url":"https://api.github.com/users/JoSquiders/orgs","repos_url":"https://api.github.com/users/JoSquiders/repos","events_url":"https://api.github.com/users/JoSquiders/events{/privacy}","received_events_url":"https://api.github.com/users/JoSquiders/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T13:57:03Z","updated_at":"2015-04-07T13:57:03Z","body":"Thank you for your help judgej. I will tidy up the handling of the Sagepay responses once I can get it working, am still trying to get past that error at the moment! Some useful tips about the correct process thank you.\r\n\r\nIt's not getting past the `completePurchase()` function at the moment so it's not even hitting `$response->confirm()`. Am logging each step to a database and this is where it gets to so I must be missing something else!"}}