From f577756ef3a7d9eecb3e9584dfd733f107c71484 Mon Sep 17 00:00:00 2001 From: Arthur Nassar <98289378+arthurnassar@users.noreply.github.com> Date: Sun, 12 May 2024 18:09:26 +0100 Subject: [PATCH 1/2] Update method to avoid clash with laravel cashier Currently both billable and payable implement the same pay method. This can break applications that can have users that will receive and pay on the platform in case of affiliate links for example This is a breaking change --- src/Traits/Payable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Traits/Payable.php b/src/Traits/Payable.php index 8d36ab9..d24571b 100644 --- a/src/Traits/Payable.php +++ b/src/Traits/Payable.php @@ -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([ From 91c3731dd6266e3f65cc771dddf773b9c51ed9c3 Mon Sep 17 00:00:00 2001 From: Arthur Nassar <98289378+arthurnassar@users.noreply.github.com> Date: Sun, 12 May 2024 18:12:22 +0100 Subject: [PATCH 2/2] update readme --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 4bfb6a1..9745812 100644 --- a/readme.md +++ b/readme.md @@ -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]