mirror of
https://github.com/bitinflow/accounts.git
synced 2026-03-17 23:45:52 +00:00
Update HasBitinflowPaymentsWallet.php
This commit is contained in:
@@ -161,12 +161,14 @@ trait HasBitinflowPaymentsWallet
|
|||||||
public function setDefaultWallet(string $token): bool
|
public function setDefaultWallet(string $token): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return (bool)$this->asPaymentsUser('PUT', sprintf('wallets/default', [
|
$this->asPaymentsUser('PUT', sprintf('wallets/default', [
|
||||||
'token' => $token
|
'token' => $token
|
||||||
]));
|
]));
|
||||||
} catch (GuzzleException $e) {
|
} catch (GuzzleException $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -247,10 +249,12 @@ trait HasBitinflowPaymentsWallet
|
|||||||
public function checkoutSubscription(string $id): bool
|
public function checkoutSubscription(string $id): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return (bool)$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/checkout', $id));
|
$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/checkout', $id));
|
||||||
} catch (GuzzleException $e) {
|
} catch (GuzzleException $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -262,10 +266,12 @@ trait HasBitinflowPaymentsWallet
|
|||||||
public function revokeSubscription(string $id): bool
|
public function revokeSubscription(string $id): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return (bool)$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/revoke', $id));
|
$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/revoke', $id));
|
||||||
} catch (GuzzleException $e) {
|
} catch (GuzzleException $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -277,10 +283,12 @@ trait HasBitinflowPaymentsWallet
|
|||||||
public function resumeSubscription(string $id): bool
|
public function resumeSubscription(string $id): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return (bool)$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/resume', $id));
|
$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/resume', $id));
|
||||||
} catch (GuzzleException $e) {
|
} catch (GuzzleException $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -341,10 +349,12 @@ trait HasBitinflowPaymentsWallet
|
|||||||
public function checkoutOrder(string $id): bool
|
public function checkoutOrder(string $id): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return (bool)$this->asPaymentsUser('PUT', sprintf('orders/%s/checkout', $id));
|
$this->asPaymentsUser('PUT', sprintf('orders/%s/checkout', $id));
|
||||||
} catch (GuzzleException $e) {
|
} catch (GuzzleException $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -356,10 +366,12 @@ trait HasBitinflowPaymentsWallet
|
|||||||
public function revokeOrder(string $id): bool
|
public function revokeOrder(string $id): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return (bool)$this->asPaymentsUser('PUT', sprintf('orders/%s/revoke', $id));
|
$this->asPaymentsUser('PUT', sprintf('orders/%s/revoke', $id));
|
||||||
} catch (GuzzleException $e) {
|
} catch (GuzzleException $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user