diff --git a/src/Resource/Payment.php b/src/Resource/Payment.php index dcbfa47..763afcf 100755 --- a/src/Resource/Payment.php +++ b/src/Resource/Payment.php @@ -275,7 +275,7 @@ public function getFundingInstrument() */ public function getHrefBoleto() { - return $this->getIfSet('_links')->payBoleto->redirectHref; + return (isset($this->getIfSet('_links')->payBoleto)) ? $this->getIfSet('_links')->payBoleto->redirectHref : $this->getIfSet('_links')->checkout->payBoleto->redirectHref; } /** @@ -297,7 +297,7 @@ public function getLineCodeBoleto() */ public function getHrefPrintBoleto() { - return $this->getIfSet('_links')->payBoleto->printHref; + return (isset($this->getIfSet('_links')->payBoleto)) ? $this->getIfSet('_links')->payBoleto->printHref : $this->getIfSet('_links')->checkout->payBoleto->printHref; } /**