From 64c0bc78de55fca48af4a8208c609153a28659d7 Mon Sep 17 00:00:00 2001 From: Asanov Ruslan Date: Fri, 8 Oct 2021 09:56:34 +0500 Subject: [PATCH 1/3] the $amount parameter can be null by default --- src/Concerns/ManagesTransfer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Concerns/ManagesTransfer.php b/src/Concerns/ManagesTransfer.php index 45674ac..4181520 100644 --- a/src/Concerns/ManagesTransfer.php +++ b/src/Concerns/ManagesTransfer.php @@ -50,7 +50,7 @@ public function transferToStripeAccount(int $amount, string $currency = 'USD', a * @return TransferReversal * @throws AccountNotFoundException|ApiErrorException */ - public function reverseTransferFromStripeAccount(Transfer $transfer, $refundFee = false, ?int $amount, array $options = []): TransferReversal + public function reverseTransferFromStripeAccount(Transfer $transfer, bool $refundFee = false, ?int $amount = null, array $options = []): TransferReversal { $this->assertAccountExists(); From 0ce65c6101cc6e6a11bd06c3d815246ee72a6b37 Mon Sep 17 00:00:00 2001 From: Asanov Ruslan Date: Fri, 8 Oct 2021 09:58:23 +0500 Subject: [PATCH 2/3] the arrival_date parameter is not needed to create a payout --- src/Concerns/ManagesPayout.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Concerns/ManagesPayout.php b/src/Concerns/ManagesPayout.php index 535aa68..7d50630 100644 --- a/src/Concerns/ManagesPayout.php +++ b/src/Concerns/ManagesPayout.php @@ -3,7 +3,6 @@ namespace ExpDev07\CashierConnect\Concerns; -use Carbon\Traits\Date; use ExpDev07\CashierConnect\Exceptions\AccountNotFoundException; use Illuminate\Support\Str; use Stripe\Exception\ApiErrorException; @@ -21,13 +20,12 @@ trait ManagesPayout * Pay * * @param int $amount Amount to be transferred to your bank account or debit card. - * @param Date $arrival Date the payout is expected to arrive in the bank. * @param string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @param array $options * @return Payout * @throws AccountNotFoundException|ApiErrorException */ - public function payoutStripeAccount(int $amount, Date $arrival, string $currency = 'USD', array $options = []): Payout + public function payoutStripeAccount(int $amount, string $currency = 'USD', array $options = []): Payout { $this->assertAccountExists(); @@ -35,7 +33,6 @@ public function payoutStripeAccount(int $amount, Date $arrival, string $currency $options = array_merge($options, [ 'amount' => $amount, 'currency' => Str::lower($currency), - 'arrival_date' => $arrival->timestamp, ]); return Payout::create($options, $this->stripeAccountOptions([], true)); From ed114ab8eb48ca459dd3c6831b881dfc39bdb78b Mon Sep 17 00:00:00 2001 From: Asanov Ruslan Date: Fri, 8 Oct 2021 10:27:10 +0500 Subject: [PATCH 3/3] missing brace --- src/Billable.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Billable.php b/src/Billable.php index d8e5756..c2ba392 100644 --- a/src/Billable.php +++ b/src/Billable.php @@ -40,9 +40,9 @@ public function stripeAccountOptions(array $options = [], bool $sendAsAccount = if ($sendAsAccount && $this->hasStripeAccountId()) { $options['stripe_account'] = $this->stripeAccountId(); } - - // Workaround for Cashier 12.x - if (version_compare(Cashier::VERSION, '12.15.0', '<=') { + + // Workaround for Cashier 12.x + if (version_compare(Cashier::VERSION, '12.15.0', '<=')) { return array_merge(Cashier::stripeOptions($options)); }