Added duplicate paid/confirmed/complete checks

And also added more error handling