You can use Alipay for some limited things with only a foreign credit card, like sometimes buying on Taobao/Tmall and topping up a SIM card.
But to receive funds and use QR code payments you need to be real-name verified with a Mainland bank account, bearing in mind that not all Mainland banks work for this purpose with foreigners.