From 35bbee9fd1b351fc97c1ca8d8dc1c64fe1b2631e Mon Sep 17 00:00:00 2001 From: mentec Date: Mon, 24 Mar 2014 10:35:20 -0300 Subject: [PATCH] Update Moip.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit É necessário alterar o código nos métodos: setNotificationURL() e setReturnURL(), para que possam receber & na url: DE: $this->xml->InstrucaoUnica->addChild('URLNotificacao', $url); $this->xml->InstrucaoUnica->addChild('URLRetorno', $url); PARA: $this->xml->InstrucaoUnica->URLNotificacao = $url; $this->xml->InstrucaoUnica->URLRetorno = $url; Como informado aqui: http://www.php.net/manual/pt_BR/simplexmlelement.addchild.php#112204 --- lib/Moip.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Moip.php b/lib/Moip.php index 08f1bef..9cc8e52 100644 --- a/lib/Moip.php +++ b/lib/Moip.php @@ -494,7 +494,7 @@ public function addMessage($msg) { */ public function setReturnURL($url) { if (!isset($this->xml->InstrucaoUnica->URLRetorno)) { - $this->xml->InstrucaoUnica->addChild('URLRetorno', $url); + $this->xml->InstrucaoUnica->URLRetorno = $url; } return $this; } @@ -509,7 +509,7 @@ public function setReturnURL($url) { */ public function setNotificationURL($url) { if (!isset($this->xml->InstrucaoUnica->URLNotificacao)) { - $this->xml->InstrucaoUnica->addChild('URLNotificacao', $url); + $this->xml->InstrucaoUnica->URLNotificacao = $url; } } @@ -814,4 +814,4 @@ function __construct($base_url = '', $name = '') $this->base_url = $base_url; $this->name = $name; } -} \ No newline at end of file +}