the checkout link does not work because there is no page specified in the checkout server behavior to redirect to.
the error is occurring because of a blank line in the code.
at line 57, there is a blank line between code blocks that needs to be removed:
56- ?>
57-
58-<?php
in the server behaviors tab, double click the checkout server behavior and specify a page to direct to for checkout.