The latter is correct. The former is grammatically wrong as it roughly translates to "I bought this book 1200 yen" (lacking 'for', as denoted by ).
The latter is correct. The former is grammatically wrong as it roughly translates to "I bought this book 1200 yen" (lacking 'for', as denoted by ).