Yes, it's illegal. What you've done over the internet is called wire fraud. Since the internet crosses state borders, it's automatically a felony and can result in sentences up to 20 years in prison. Granted, for $300, that's not likely, but there is no statutory minimum or sentencing guidelines, so if the judge wanted to, the judge could send you to prison for 20 years on a conviction of wire fraud for $300.
Also, if you've had the individual order it for you, then it has been delivered. If you use the U.S. Postal Service, the greatest crime, which would add several years of jail time to the wire fraud, would be mail fraud. If you use a service like FedEx or U.P.S., then it's not quite so severe, you'll get off with just a couple of extra years in jail for interstate commerce fraud.
Why are are the penalties so steep? Because this kind of fraud has become a huge problem and the perpetrators have been hard to catch, so when they catch one, they really want to make an example, an example that will tell everyone: Don't do it because going to prison for years over $300 isn't worth it.