Wire seller push notifications with FCM, inbox API, and payment milestones.
Deploy Ladill Mini / deploy (push) Successful in 52s
Deploy Ladill Mini / deploy (push) Successful in 52s
Sellers get instant payment alerts on Android; withdrawals respect payout prefs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Api\Mini;
|
||||
use App\Http\Controllers\Api\Concerns\CallsIdentityApi;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Billing\BillingClient;
|
||||
use App\Services\Notifications\MiniNotificationService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -14,7 +15,10 @@ class WalletController extends Controller
|
||||
{
|
||||
use CallsIdentityApi;
|
||||
|
||||
public function __construct(private BillingClient $billing) {}
|
||||
public function __construct(
|
||||
private BillingClient $billing,
|
||||
private MiniNotificationService $notifications,
|
||||
) {}
|
||||
|
||||
public function show(): JsonResponse
|
||||
{
|
||||
@@ -118,6 +122,11 @@ class WalletController extends Controller
|
||||
]);
|
||||
$this->rethrowValidation($response, 'amount');
|
||||
|
||||
$this->notifications->withdrawalSubmitted(
|
||||
ladill_account(),
|
||||
(float) $data['amount'],
|
||||
);
|
||||
|
||||
return response()->json(['data' => $response->json('data', [])]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user