Integrate a PHP e-Commerce app inside a WordPress site

We have a client that has a PHP e-Commerce app just running in their site for years and they hired us to create a new site for them using WordPress but preserving their PHP e-Commerce app. The PHP app uses a DB2 database and we would need to have a minicart from there in all WP pages. I would like to know if someone here just had to face a similar situation and what was the solution used. We are totally open for all suggestions you have. Thanks!