A supermarket shopper has been hailed an “absolute champion” after he paid for an elderly woman’s shopping when her card was declined.

Ryan O’Donnell noticed the woman in front of him was having difficulty paying at the Wyoming Coles store in New South Wales so stepped in to settle her AUS$44 (£27) bill.

The father-of-two told Channel 9 News he intervened because “that’s how my mum and dad brought me up.”

“I was just there in the grocery aisle or checkout with my kids and I saw the old lady having some trouble with the card," the 34-year-old said.

“She swiped it quite a number of times and then they took her around to the front cigarette counter and got her to keep trying.

"By that stage my groceries had gone through and I went around and spoke to the young lady and said ‘how much is it’ and they said $44 or something...her card kept being declined due to insufficient funds so I said ‘Look, here’s $50 just take it out of that’.”

The heartwarming moment was captured by fellow shopper Luke, who posted a photo to Twitter.

He wrote: “This guy at Wyoming Coles who just went through the register with his two kids paid for this ladies groceries when her card kept declining ”

He later added: “I couldn't fit this in the original tweet but she wanted to pay him back eventually and he just said ‘Don't worry, have a good day’”

Mr O’Donnell said the lady had wished to pay him back and was concerned about how she was going to return the money.

“I said ‘Oh look, don’t worry about it — it’s only $44, you’ll be right and enjoy your day’. With that I walked off and I think I went and bought myself a coffee from Gloria Jeans,” he told Channel 9 News.

Social media users have praised the stay-at-home dad as a "legend", “good samaritan” and “awesome guy.”

"Absolute Champion. Should be more people like him in this world. If we all knew how to give, think of how amazing life would be?" one user wrote on Twitter.

Another wrote: "What a nice person! Humans at their best."

One user said: "The world, while seemingly drowning in paranoia and hate, just keeps giving. Thanks for sharing."