/** * Read Token * * @return Token */ private function readToken() { $token = new Token(); $token->setCode($this->getValue('//c:retorno-token/c:token/c:dados-token/c:codigo-token')); $token->setStatus($this->getValue('//c:retorno-token/c:token/c:dados-token/c:status')); $token->setNumero($this->getValue('//c:retorno-token/c:token/c:dados-token/c:numero-cartao-truncado')); return $token; }
/** * @param Transaction $transaction */ private function readToken(Transaction $transaction) { $token = new Token(); $token->setCode($this->getValue('//c:transacao/c:token/c:dados-token/c:codigo-token')); $token->setStatus($this->getValue('//c:transacao/c:token/c:dados-token/c:status')); $token->setNumero($this->getValue('//c:transacao/c:token/c:dados-token/c:numero-cartao-truncado')); $transaction->setToken($token); }
/** * @test */ public function getNumero() { $this->token->setNumero('9999999999999999'); $this->assertEquals('9999999999999999', $this->token->getNumero()); }