If a payment method (like authorizenet_aim) sets a value into the session variable 'payment_method_messages', those messages are displayed on the checkout success page. If a message was set by one payment method and the customer, during the same session, chose to create another order using a different payment method then those same messages would be displayed to the customer at the conclusion of the second order ... since the session variable is never reset.
Current code fragment in tpl_checkout_success_default.php:
Code:
<!-- bof payment-method-alerts -->
<?php
if (isset($_SESSION['payment_method_messages']) && $_SESSION['payment_method_messages'] != '') {
?>
<div class="content">
<?php echo $_SESSION['payment_method_messages']; ?>
</div>
<?php
}
?>
<!-- eof payment-method-alerts -->
Proposed addition in red:
Code:
<!-- bof payment-method-alerts -->
<?php
if (isset($_SESSION['payment_method_messages']) && $_SESSION['payment_method_messages'] != '') {
?>
<div class="content">
<?php echo $_SESSION['payment_method_messages']; ?>
</div>
<?php
unset($_SESSION['payment_method_messages']);
}
?>
<!-- eof payment-method-alerts -->
Bookmarks