diff --git a/src/Traits/PayPalAPI.php b/src/Traits/PayPalAPI.php index 6168b459..f95e3417 100644 --- a/src/Traits/PayPalAPI.php +++ b/src/Traits/PayPalAPI.php @@ -126,7 +126,7 @@ public function setCurrentPage(int $page): \Srmklive\PayPal\Services\PayPal */ public function showTotals(bool $totals): \Srmklive\PayPal\Services\PayPal { - $this->show_totals = var_export($totals, true); + $this->show_totals = $totals ? 'true' : 'false'; return $this; } diff --git a/src/Traits/PayPalHttpClient.php b/src/Traits/PayPalHttpClient.php index 8c030a97..7723b66c 100644 --- a/src/Traits/PayPalHttpClient.php +++ b/src/Traits/PayPalHttpClient.php @@ -173,7 +173,7 @@ private function setDefaultValues() $validateSSL = empty($this->validateSSL) ? true : $this->validateSSL; $this->validateSSL = $validateSSL; - $this->show_totals = var_export($this->show_totals, true); + $this->showTotals(true); } /** diff --git a/src/Traits/PayPalRequest.php b/src/Traits/PayPalRequest.php index 09aecb50..362103cf 100644 --- a/src/Traits/PayPalRequest.php +++ b/src/Traits/PayPalRequest.php @@ -62,9 +62,9 @@ trait PayPalRequest /** * Toggle whether totals for list resources are returned after every API call. * - * @var bool + * @var string */ - protected $show_totals = true; + protected string $show_totals; /** * Set PayPal API Credentials.