/**
  * {@inheritdoc}
  */
 public function handleRequest(Config $config)
 {
     $validParameters = array('e', 'r', 'v', 'k');
     $parameters = $this->paymentResult->toArray();
     foreach ($parameters as $key => $value) {
         if (!in_array($key, $validParameters)) {
             unset($parameters[$key]);
         }
     }
     // Optional authentication code
     if ($config->getCode()) {
         $parameters['s_code'] = $config->getCode();
     }
     return $parameters;
 }
 public function testNotValid()
 {
     $result = new PaymentResult('entity', 'reference', '1.23', 'authorizationKey', 'err', 'key');
     $this->assertFalse($result->isValid());
 }