File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/Payum/PayumModule/Security Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,11 @@ public function __construct(StorageInterface $tokenStorage)
2626 /**
2727 * {@inheritDoc}
2828 */
29- public function verify ($ httpRequest )
29+ public function verify ($ controller )
3030 {
31+
32+ $ httpRequest = $ controller ->getRequest ();
33+
3134 if (false == $ httpRequest instanceof Request) {
3235 throw new InvalidArgumentException (sprintf (
3336 'Invalid request given. Expected %s but it is %s ' ,
@@ -36,8 +39,10 @@ public function verify($httpRequest)
3639 ));
3740 }
3841
42+ $ hash = $ controller ->params ()->fromRoute ('payum_token ' ) ?: $ httpRequest ->getQuery ('payum_token ' );
43+
3944 /** @var $httpRequest Request */
40- if (false === $ hash = $ httpRequest -> getQuery ( ' payum_token ' ) ) {
45+ if (! $ hash ) {
4146 //TODO we should set 404 to response but I do not know how. symfony just throws not found exception.
4247 throw new InvalidArgumentException ('Token parameter not set in request ' );
4348 }
@@ -70,4 +75,4 @@ public function invalidate(TokenInterface $token)
7075 {
7176 $ this ->tokenStorage ->delete ($ token );
7277 }
73- }
78+ }
You can’t perform that action at this time.
0 commit comments