They are not charging extra for credit, but giving a discount for cash that is already figured into the published price. It is legal to offer a cash discount for paying cash. It is not legal to charge more for using a credit card! I know that this is a hard concept for some to understand, but there is a difference. It is also doesn't matter if it is wholesale or retail, you can not discriminate for a credit card or debit card sale.
Now, it is also a violation of the MasterCard merchant agreement to only accept the card as a debit, but not as a credit card. Apparently Walmart is big enough that they are ignoring this. My best guess is that if MasterCard pushes the issue, they are going to try to challenge that part of the merchant agreement in court. This, I assume, is all a well thought out strategy to bring down rates that Walmart has to pay to the credit card companies. If Walmart can shave 1/100 of a percent off of the discount rate, that can amount to millions of dollars to them in just one year.
I just received the credit card statement from my wifes store processing company. We pay a different rate for cards that have the NYCE, PULSE, & STAR NE emblems on them. There is a separate charge for charges that are cleared as debit cards and that rate is different for MasterCard and Visa. There is also a different rate for cards that are cleared as Corporate Cards and that is a higher rate and the rate is not the same for MasterCard and Visa. There is no way to know a Corporate Card from any other card, but you pay a higher discount rate. If a card doesn't scan and is hand keyed, then we will also pay a higher rate for that sale. There is a per item fee of $.05 per item for credit card for every sale and $.25 for every debit card. You need to be a CPA to figure out all the charges that they apply for all the different things. A credit card sale isn't always the same. Two people making the same purchase at the same store at the same time with the same branded card issued by two different banks can cost the merchant a wide difference in processing fees and the merchant won't have any idea until the statement comes at the end of the month. Even then, it will be difficult to determine which sale the fees actually apply to. You just have to pay them and figure them into the cost of doing business. In some instances it is less expensive to accept the sale as a credit card sale and other times it is less expensive to accept the sale as a debit card sale. You just never know.