This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function b2b_callback(\Illuminate\Http\Request $request): array | |
{ | |
$raw = $request->getContent(); | |
$payload = $request->json()->all(); | |
try { | |
\Storage::disk('local')->append('b2b_callback_logs.txt', now() . " RAW:\n" . $raw . "\n\n"); | |
\Storage::disk('local')->append('b2b_callback_logs.txt', now() . " PARSED:\n" . print_r($payload, true) . "\n\n"); | |
} catch (\Throwable $e) { | |
\Log::warning('B2B log write failed: '.$e->getMessage()); | |
} |