Skip to content

Commit

Permalink
Merge pull request #5 from chuangbo/patch-1
Browse files Browse the repository at this point in the history
Allow pass token as param for complete puchase
  • Loading branch information
onlinesid authored Oct 10, 2016
2 parents b6e4ec9 + cf64387 commit 9f730dd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Message/CompletePurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -52,4 +57,9 @@ public function sendData($data)

return $this->response = new CompletePurchaseResponse($this, $httpResponse->getBody());
}

public function getToken()
{
return $this->getParameter('token');
}
}

0 comments on commit 9f730dd

Please sign in to comment.