The Magic are open for business, and it’s no surprise Knicks general manager and former Orlando executive Scott Perry has checked in on his former lottery pick, point guard Elfrid Payton, The Post has learned.

According to an NBA source who has spoken to Knicks brass, Perry has interest in reuniting with the 23-year-old Payton at the trade deadline, feeling he can get him at a discount and keep his rookie point guard Frank Ntilikina out of the deal.

Of course, it’s unclear how the Knicks will approach the deadline after Tuesday night’s devastating injury to Kristaps Porzingis less than 48 hours before the deadline.

The Magic’s new GM, John Hammond, is looking to move on from Payton, who will become a restricted free agent this summer because his rookie contract expires after the season.

Payton has shown some improvement this season, averaging 13.2 points, 6.2 assists, and 4.0 rebounds and shooting 51.8 percent — 37.3 percent from 3-point range — but is not known for his perimeter shot.

Perry’s interest stems from the organization believing it needs to get more athletic, with Payton the type of quick penetrator who can open the game up.

Ntilikina, 19, has yet to show that knack as a rookie. According to the source, Perry still believes in the 6-foot-4 Payton as a potentially solid defender, though advanced metrics show he’s subpar.

Perry, working as Rob Hennigan’s right-hand man in Orlando, made a draft-night trade with the 76ers to nab Payton with the 10th pick in 2014.

The Knicks and Magic have engaged in preliminary talks about Payton. In a larger deal, the teams have discussed adding both Orlando shotblocker Bismack Biyombo and exiled Knicks big man Joakim Noah.

Both centers are on similarly egregious contracts, but the Knicks gain in that exchange. Biyombo, 25, has been a disappointment, but has potentially one less year than Noah on his contract, with an opt-out after the 2018-19 season. Noah’s contract expires in 2020.

Both the Knicks and Noah are desperate for a trade to get him off their roster following a feud with coach Jeff Hornacek.

Biyombo, who will make $17 million next season and in 2019-20, has been a bust to a lesser extent after Perry signed him in the summer of 2016. The Knicks view Biyombo as a better shot-blocker, rim protector and more athletic defender than center Enes Kanter. He could make a better defensive pairing with Porzingis.

The Magic are trying to get value for Payton before he leaves.

If Noah and Biyombo are added, the Knicks likely would have to throw in future assets such as a 2019 lottery-protected first-rounder. Or they could add their pair of 2018 second-round picks — one of which is owned by the Bulls and could rank in the low 30s, a very strong asset.

Those second-rounders may be less necessary if the Knicks deal Kyle O’Quinn for a second-round pick. According to multiple sources, the Knicks likely will deal Willy Hernangomez if they can secure a first-round pick or a promising youngster at a different position.

Amid reports his agents have encouraged brass to seek a trade, Hernangomez reiterated he wants the Knicks to find a new home for him if his role remains diminished.

“I hope we can find the best way for my future, and for the franchise’s future so both can be happy, and hopefully we can do that before Thursday,” Hernangomez said.

The Magic aren’t pursuing Hernangomez in a Payton package. According to sources, about a dozen teams have inquired about Hernangomez, including the Nuggets, who already have one Hernangomez in his brother, Juancho.

Along with Denver, teams looking at the 23-year-old Hernangomez — the Mavericks, Spurs and Jazz — have long been associated with international products.

The knock on Payton is he’s not a strong outside shooter. The Knicks are starting to wonder if Ntilikina, at 6-foot-5, is more suited in the role of a combo guard. The Frenchman is showing an ability to play shooting guard despite his playmaking skills. The Knicks have been happy with his ability to get through screens in the limited time he’s played shooting guard.

The Knicks also have on the roster former 2013 lottery pick Trey Burke, a scoring point guard who is under contract for next season in a non-guaranteed deal. Burke is a good penetrator, but NBA scouts feel he isn’t tall enough to dish to his mates when he gets deep into the lane because of his size. Like Derrick Rose before him, Burke’s talent is to score on his paint forays.