If you haven't used your card before make sure it's enabled for online purchases. If it is then the problem is on your end. Call your bank. It could be a temporary block or your bank could be closing. BBC news predicted that some banks in Sri Lanka are collapsing or on the brink.
Banks there at times have been limiting foreign transactions. This could be one of those times.