From 2b376303b3a0af9d96cc2d018041180996fd63c8 Mon Sep 17 00:00:00 2001 From: Gianluca Maziero Machado Date: Wed, 22 Aug 2018 17:22:40 -0300 Subject: [PATCH] feat(get-href-boleto-multipayment) Fix href for multipayment --- src/Resource/Payment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } /**