Add commerce_block_info(), commerce_block_view(), _commerce_block_view() and theme_commerce_cart_block(). Change commerce_line_item_create() to URL encode the data to POST.