Closed cfreear closed 9 years ago
public function getTransactionReference() { return ($this->xml->pasref) ? $this->xml->pasref : null; }
returns SimpleXMLElement Object ( [0] => 1234567890) instead of string(10) "1234567890"
SimpleXMLElement Object ( [0] => 1234567890)
string(10) "1234567890"
I'm getting round this by doing $reference = (string)$response->getTransactionRef() but shouldn't we be returning the value directly?:
$reference = (string)$response->getTransactionRef()
public function getTransactionReference() { return ($this->xml->pasref) ? (string)$this->xml->pasref : null; }
Thanks - good call. I expect I'm probably casting it in my own code too, but it makes much more sense in the response object.
returns
SimpleXMLElement Object ( [0] => 1234567890)
instead ofstring(10) "1234567890"
I'm getting round this by doing
$reference = (string)$response->getTransactionRef()
but shouldn't we be returning the value directly?: