And as mentioned elsewhere, cash has a cost as well (theft, miscounting change, counting in and out cash drawers during shift changes, arranging daily deposits, trips to the bank, etc). As someone who worked retail 10+ years ago, I can assure you all these things happened, and probably added 2-3% to costs vs electronic payments.
That last article quotes it at up to 3% but most say 2%, so I am assuming there is a percentage and a fixed cost, and possibly a cap. In any case Walmart had a long history of being very unhappy with the relationship.
[1] http://mobile.reuters.com/article/idUSBREA2Q2BJ20140327 [2] https://mobile.nytimes.com/2003/06/06/business/merchants-may... [3] http://www.computerworld.com/article/2839144/heres-why-rite-... [4] http://time.com/money/3541247/apple-pay-walmart-current-swip...
We don't know Walmart's feelings, they may like the arrangement. Business go cash free for all kinds of reasons. Customers that use credit spend more money than cash customers. Walmart probably isn't one of those places that benefit as much as a pub but they may have a small credit spending boost that covers the fees.
Walmart is a really smart and data driven company and I'm sure they've weighed their options about what is effective business practices for them.
[0] http://time.com/money/3541247/apple-pay-walmart-current-swip...