You have injected the Request via parameter $request. This is generally not recommended as there might be multiple instances during a request cycle (f.e. when using sub-requests). Instead, it is recommended to inject the RequestStack and retrieve the current request each time you need it via getCurrentRequest().
Loading history...
50
{
51
$this->request = $request;
52
53
return $this;
54
}
55
56
/**
57
* @return Payment
58
*/
59
public function getPayment(): Payment
60
{
61
return $this->payment;
62
}
63
64
/**
65
* @param Payment $payment
66
*
67
* @return PaymentException
68
*/
69
public function setPayment(Payment $payment): self