$amount, 'authority' => $authority, ]); return [ 'authority' => $authority, 'payment_url' => url("/api/v1/payment/mock-gateway?authority={$authority}&amount={$amount}"), 'amount' => $amount, 'amount_toman' => (int) round($amount / 10), ]; } public function verifyPayment(string $authority, float $expectedAmount): array { Log::info('Mock Zarinpal Payment Verification', [ 'authority' => $authority, ]); if (str_starts_with($authority, 'MOCK_')) { return [ 'success' => true, 'ref_id' => 'MOCK_REF_' . Str::upper(Str::random(16)), 'card_hash' => 'MOCK_HASH_' . rand(100000, 999999), 'card_pan' => '6037****' . rand(1000, 9999), ]; } return [ 'success' => false, 'error_code' => -1, 'error_message' => 'Authority نامعتبر است', ]; } }