From f929f328877803a072bfa5209d5026274ac9e8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maurice=20Preu=C3=9F?= Date: Sun, 25 Sep 2022 22:18:24 +0200 Subject: [PATCH] Update HasBitinflowPaymentsWallet.php --- .../Traits/HasBitinflowPaymentsWallet.php | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/Accounts/Traits/HasBitinflowPaymentsWallet.php b/src/Accounts/Traits/HasBitinflowPaymentsWallet.php index d279747..c772866 100644 --- a/src/Accounts/Traits/HasBitinflowPaymentsWallet.php +++ b/src/Accounts/Traits/HasBitinflowPaymentsWallet.php @@ -161,12 +161,14 @@ trait HasBitinflowPaymentsWallet public function setDefaultWallet(string $token): bool { try { - return (bool)$this->asPaymentsUser('PUT', sprintf('wallets/default', [ + $this->asPaymentsUser('PUT', sprintf('wallets/default', [ 'token' => $token ])); } catch (GuzzleException $e) { return false; } + + return true; } /** @@ -247,10 +249,12 @@ trait HasBitinflowPaymentsWallet public function checkoutSubscription(string $id): bool { try { - return (bool)$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/checkout', $id)); + $this->asPaymentsUser('PUT', sprintf('subscriptions/%s/checkout', $id)); } catch (GuzzleException $e) { return false; } + + return true; } /** @@ -262,10 +266,12 @@ trait HasBitinflowPaymentsWallet public function revokeSubscription(string $id): bool { try { - return (bool)$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/revoke', $id)); + $this->asPaymentsUser('PUT', sprintf('subscriptions/%s/revoke', $id)); } catch (GuzzleException $e) { return false; } + + return true; } /** @@ -277,10 +283,12 @@ trait HasBitinflowPaymentsWallet public function resumeSubscription(string $id): bool { try { - return (bool)$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/resume', $id)); + $this->asPaymentsUser('PUT', sprintf('subscriptions/%s/resume', $id)); } catch (GuzzleException $e) { return false; } + + return true; } /** @@ -341,10 +349,12 @@ trait HasBitinflowPaymentsWallet public function checkoutOrder(string $id): bool { try { - return (bool)$this->asPaymentsUser('PUT', sprintf('orders/%s/checkout', $id)); + $this->asPaymentsUser('PUT', sprintf('orders/%s/checkout', $id)); } catch (GuzzleException $e) { return false; } + + return true; } /** @@ -356,10 +366,12 @@ trait HasBitinflowPaymentsWallet public function revokeOrder(string $id): bool { try { - return (bool)$this->asPaymentsUser('PUT', sprintf('orders/%s/revoke', $id)); + $this->asPaymentsUser('PUT', sprintf('orders/%s/revoke', $id)); } catch (GuzzleException $e) { return false; } + + return true; } /**