Interestingly, there is even a movie called The Spanish Prisoner (http://www.imdb.com/title/tt0120176/) from 1997 based on this type of scam. It is good and I recommend it.
The movie plot has very little to do with the spanish prisoner scam. A good movie anyway, probably Mamet's best after Glengarry Glenn Ross and House of Games.