diff --git a/src/Message/CompletePurchaseRequest.php b/src/Message/CompletePurchaseRequest.php index d7aab5c..78dbe25 100644 --- a/src/Message/CompletePurchaseRequest.php +++ b/src/Message/CompletePurchaseRequest.php @@ -23,7 +23,12 @@ public function getData() 'authenticationCode' ); - $token = $this->httpRequest->query->get('token'); + $token = $this->getToken(); + + if (!$token) { + $token = $this->httpRequest->query->get('token'); + } + if (!$token) { //this may be a POST nudge request, so look for the token there $token = $this->httpRequest->request->get('Token'); @@ -52,4 +57,9 @@ public function sendData($data) return $this->response = new CompletePurchaseResponse($this, $httpResponse->getBody()); } + + public function getToken() + { + return $this->getParameter('token'); + } }