Hey,
When I place a test order with the BNG gateway, the money is received and the order is processed, but instead of going to an order received page, the gateway redirects you to the cart.
Do you have any idea why this would happen and do you know how we can fix this?
Adam
]]>When product names include double quotes, the plugin breaks due to some inline javascript not escaping the quotes in the product names.
The problem is here:
file: bng_three_step_gateway_functions.php
line: 299
//loop through items, build array
$items = $order->get_items();
$x = 0;
foreach ($items AS $item) {
echo ' var item = [];';
echo ' item["productid"] = "'.$item['product_id'].'";';
echo ' item["name"] = "'.$item['name'].'";';
echo ' item["line_total"] = "'.$item['line_total'].'";';
echo ' item["qty"] = '.$item['qty'].';';
echo ' item["line_subtotal"] = "'.$item['line_subtotal'].'";';
echo ' data["item'.$x.'"] = item;';
$x++;
}
Rather than building the JavaScript object manually, I recommend building a php array and running it through json_encode()
.