Is the extension compatible with MultiSafepay?
Yes. Please use the following workaround when installing Fooman Surcharge:
1. In: /app/code/community/Mage/Msp/Model/Payment.php find: //End shipping line item
2. Add this straight after it:
if ($this->getOrder()->getFoomanSurchargeAmount() != 0) {
$surcharge_amount_final = number_format(
$this->getOrder()->getBaseFoomanSurchargeAmount() + $this->getOrder()->getBaseFoomanSurchargeTaxAmount(), 4, '.', ''
);
$c_item = new MspItem(
$this->getOrder()->getFoomanSurchargeDescription(),
$this->getOrder()->getFoomanSurchargeDescription(),
1,
$surcharge_amount_final,
'KG',
0
);
$c_item->SetMerchantItemId('Surcharge');
$surcharge_tax_id = 'none';
if ($this->getOrder()->getBaseFoomanSurchargeTaxAmount()) {
$surcharge_tax_id = $shipping_tax_id; //uses the same as shipping adjust if necessary
}
$c_item->SetTaxTableSelector($surcharge_tax_id);
$this->api->cart->AddItem($c_item);
}