On page 8 last part of the code is annotated with the following:
We simulate the charge here by printing to the console, but in a real program, this would interact with the credit card company.
This doesn't make sense in this context since printing is no longer done at this point and this annotation was used page 5 so this seems to be a typo.