$costPerPrint, 'razorpay_key' => $razorpayKey, 'razorpay_secret' => $razorpaySecret ]); file_put_contents('config.json', $config); echo json_encode(["success" => true, "message" => "Settings saved successfully."]); exit; } $configData = file_exists('config.json') ? json_decode(file_get_contents('config.json'), true) : []; $costPerPrint = $configData['cost_per_print'] ?? ''; $razorpayKey = $configData['razorpay_key'] ?? ''; $razorpaySecret = $configData['razorpay_secret'] ?? ''; ?>