Added complete listener in pay method.