They do completely different things. A VPN connection encrypts data going across a network - it might be used to hide traffic from a network monitor or ISP, for example. A sandbox prevents access between applications on the same PC - it would aim to protect against malicious software on the local machine.
When making payments, the data being sent to the recipient site is usually encrypted by the use of HTTPS. It can't be encrypted further for the final leg because the recipient site wouldn't be able to decrypt it. This is the case when using a VPN too - the connection between the VPN endpoint and the shop is only encrypted with the shop's SSL certificate. By contrast, when you connect directly, the connection between your computer and the shop is encrypted with the SSL certificate .
A VPN can be used to browse anonymously, as long as you trust the VPN provider - they will know both the original source of the data (and if they're a paid provider, probably precisely who is behind it) and the destination. However, if you make payments using credit cards or similar methods, you will still reveal your identity to the recipient site, even though they wouldn't be able to see your original IP address as easily.
A sandbox doesn't conceal your IP address - it can't, since the data is still coming directly from your computer. It also can't encrypt data in transit further, else the receiver wouldn't be able to use it. However, it can attempt to protect against other software on your machine being able to tamper with the data before it is sent. It has nothing to do with anonymity.
 This is a slight simplification, but the key elements are included.