I have gone to my Vet for close to 25 yrs..I like him, but the onset of computers has changed the interaction between Vet and client.
Last summer, I was finally told that my Vet will price match what you find online...all you have to do is print the quote out. The advantage is that you got it from the Vet, it's in the records if something happens, and you know it is legit.
It may be worth it to ask if your Vet will do this.
Edited to say this was for flea meds.
Heartworm meds are different and do require an RX for your pet's safety.. Your pet needs a yearly test before a new RX is given for heartworm med.. I have cared for a few heartworm positive fosters, and I don't want to go there with my own dogs.