From 031d69d7c99f9ef0874a34cb85326ede28cd7aed Mon Sep 17 00:00:00 2001 From: Raza Mehdi Date: Mon, 24 Jun 2024 19:32:50 +0500 Subject: [PATCH] Fixes #643 for v3.0 --- src/Traits/PayPalAPI.php | 2 +- src/Traits/PayPalHttpClient.php | 2 +- src/Traits/PayPalRequest.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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.