Bei einem Abbruch findet ein Redirect auf den Warenkorb statt, weil die verkaufte Artikel Mange schon um 1 erniedrigt wurde und die Artikel nicht mehr kaufbar sind laut Datenbank.
Deswegen muss in der checkout_payment.php folgender Code eingefügt werden
if($_GET['payment_error'] == 'sofortueberweisung_direct')
{
/* require (DIR_WS_CLASSES . 'payment.php');
$payment_modules = new payment('sofortueberweisung_direct');
if ($confirmation = $payment_modules->confirmation())
{
}*/
require_once (DIR_WS_CLASSES.'order.php');
require_once (DIR_FS_INC.'xtc_db_query.inc.php');
require_once (DIR_FS_INC.'xtc_get_prid.inc.php');
$order = new order();
for ($i = 0, $n = sizeof($order->products); $i < $n; $i ++)
{
xtc_db_query("update ".TABLE_PRODUCTS." set products_quantity = products_quantity + 1 where products_id = '".xtc_get_prid($order->products[$i]['id'])."'");
}
unset($order);
}
oberhalb von
// if there is nothing in the customers cart, redirect them to the shopping cart page if ($_SESSION['cart']->count_contents() < 1) xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));
