Skip to content

Commit

Permalink
Fixes #643 for v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
srmklive committed Jun 24, 2024
1 parent 24c2a26 commit 031d69d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Traits/PayPalAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/PayPalHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/PayPalRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 031d69d

Please sign in to comment.