/**
  * @param GatewayConfigInterface $gatewayConfig
  *
  * @return array
  */
 public function convert(GatewayConfigInterface $gatewayConfig)
 {
     $config = array();
     foreach ($gatewayConfig->getConfig() as $name => $value) {
         $config[$name] = Mask::mask($value, '*');
     }
     return array('gatewayName' => $gatewayConfig->getGatewayName(), 'factoryName' => $gatewayConfig->getFactoryName(), 'config' => $config);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function setNumber($number)
 {
     $this->number = $number;
     $this->maskedNumber = Mask::mask($this->number);
 }
Ejemplo n.º 3
0
 /**
  * @test
  */
 public function shouldNotShowAnythingIfNegativeShowLastGiven()
 {
     $this->assertSame('BXXXXXXXX', Mask::mask('Beatrices', null, -1));
 }
Ejemplo n.º 4
0
 /**
  * {@inheritDoc}
  */
 public function __debugInfo()
 {
     return ['value' => is_scalar($this->value) ? Mask::mask($this->value) : '[FILTERED OUT]'];
 }
Ejemplo n.º 5
0
 /**
  * {@inheritDoc}
  */
 public function setNumber($number)
 {
     $this->securedNumber = SensitiveValue::ensureSensitive($number);
     $this->maskedNumber = Mask::mask($this->securedNumber->peek());
     //BC
     $this->number = $this->securedNumber->peek();
 }