Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update method to avoid clash with laravel cashier #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ Route::get('/connect', function () {
})->middleware(['auth']);
```

Once a user's Stripe account is all connected and active, you can start sending them payments:
Once a user's Stripe account is all connected and active, you can start creating transfers:

```php
auth()->user()->pay(10000, 'usd');
auth()->user()->transfer(10000, 'usd');
```

> [!NOTE]
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/Payable.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getStripeAccountLink(LinkType $type = LinkType::Onboarding): str
return $link->url;
}

public function pay($amount, $currency): Transfer
public function transfer($amount, $currency): Transfer
{
// TODO: capture this in the database, which may allow us to do a reversal later
return static::$stripe->transfers->create([
Expand Down