Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Billable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
5 changes: 1 addition & 4 deletions src/Concerns/ManagesPayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -21,21 +20,19 @@ 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();

// Create the payload for payout.
$options = array_merge($options, [
'amount' => $amount,
'currency' => Str::lower($currency),
'arrival_date' => $arrival->timestamp,
]);

return Payout::create($options, $this->stripeAccountOptions([], true));
Expand Down
2 changes: 1 addition & 1 deletion src/Concerns/ManagesTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down