Here are the changes I had to make to get this addon to work. Thanks for your contribution, Square is a great asset!
////////////////
on template_bottom.php
Step 1:
change
$applicationID_query = tep_db_query("select configuration_value from configuration where configuration_key = 'MODULE_PAYMENT_SQUARE_APPLICATION_ID'");
$applicationID = tep_db_fetch_array($applicationID_query)['configuration_value'];
to
$applicationID_query = tep_db_query("select configuration_value from configuration where configuration_key = 'MODULE_PAYMENT_SQUARE_APPLICATION_ID'");
$application_array = tep_db_fetch_array($applicationID_query);
$applicationID = $application_array['configuration_value'];
Step 2:
change
document.getElementById("form").submit();
to
document.getElementById("checkout_confirmation").submit();
////////////////
on checkout_confirmation.php
Step 1:
change
echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');
to
echo tep_draw_form('checkout_confirmation', $form_action_url, 'post', 'id="checkout_confirmation"');
Step 2:
after
if (is_array($payment_modules->modules)) {
echo $payment_modules->process_button();
}
add
if ($payment_modules->selected_module != 'square') {
echo tep_draw_button(IMAGE_BUTTON_CONFIRM_ORDER, 'check', null, 'primary');
}