GTIN weighting
ISBN-13 dropped mod 11 in 2007 so book numbers would fit the retail barcode system. The check digit follows the GTIN rule: weight the digits alternately 1 and 3 from the left, sum, and pad up to the next multiple of 10.
Because the modulus is 10, a check digit is always a single digit. X never appears in an ISBN-13.
The 978 and 979 prefixes
978 was the original Bookland prefix. 979 was added when the first range filled, and 979-8 is the range used by several self-publishing platforms. Both prefixes validate the same way.
Adding a check digit expects the first 12 digits, prefix included. 978030640615 returns 9780306406157.