php: Abort if order_ref hasn't been given
php: check database exists