It's not so much the dog doesn't listen, more that he doesn't understand what you want him to do. Go back to basics and don't punish him when he toilets indoors. Double your vigilance and take every opportunity to put him outside to toilet. The crucial thing is to be present when he does toilet in the correct place, so that you can reward him. This makes him keener to repeat the performance to get another treat. Conversely, if you have been telling him off for indoor accidents he may already feel inhibited about going to the toilet in your presence, including when he goes outdoors. This is one reason why it's important not to punish for inappropriate toileting.
To communicate clearly and consistently with your dog, you need to understand how she learns. Dogs learn through the immediate consequences of their behavior. The nature of those consequences determines how they’ll behave in the future. Dogs, like other animals (people included), work to get good things and avoid bad things in life. If a behavior results in something rewarding-like food, a good belly rub, playtime with dog buddies or a game of fetch with her pet parent-your dog will do that behavior more often. On the other hand, if a behavior results in an unpleasant consequence-like being ignored or losing things she finds rewarding-she’ll do that behavior less often.
Be persistent! Make sure the puppy doesn't get the opportunity to pee and poop by using a leash indoors or confining him to a crate when you're out. Depending on the puppies age, pop him outside every 20 - 30 minutes, so there's a greater chance of him toileting outside (by accident at first.) In addition, get rid of any scent markers he's left by peeing or pooping indoors, as these will draw him back to the same spot. This means cleaning the area daily, for 2- 3 weeks after he last pooped there to fully get rid of any lingering odor that the dog can detect. How do I teach my dog basic obedience?
Taking the learning from Stages 1 and 2, we now test the dog within a public environment with real life distractions. This period can be the most challenging for the dog. Using a range of public locations we train the dog to utilise learned behaviours.During Stage 3 we expect the dog to work on verbal commands only, asking for a higher level of obedience. The training is still fun. At this stage, we have usually exchanged the food reward for a toy. Can I send my dog away to get trained?