diff --git a/src/Traits/PayPalAPI.php b/src/Traits/PayPalAPI.php index 5c06d87f..9de4d958 100644 --- a/src/Traits/PayPalAPI.php +++ b/src/Traits/PayPalAPI.php @@ -129,7 +129,7 @@ public function setCurrentPage(int $page): PayPalClient */ public function showTotals(bool $totals): PayPalClient { - $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 5a1377c2..c90ce7b3 100644 --- a/src/Traits/PayPalHttpClient.php +++ b/src/Traits/PayPalHttpClient.php @@ -173,7 +173,7 @@ private function setDefaultValues(): void $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 82b92946..fd2f9989 100644 --- a/src/Traits/PayPalRequest.php +++ b/src/Traits/PayPalRequest.php @@ -63,9 +63,9 @@ trait PayPalRequest /** * Toggle whether totals for list resources are returned after every API call. * - * @var bool + * @var string */ - protected bool $show_totals = true; + protected string $show_totals; /** * Set PayPal API Credentials.