When payment is made with currency without decimals (like the Colombian Peso), the amount sent to SERMEPA is not multiplied by 100, so when we got to the payment gateway the amount payable is divided by 100 to add decimals.
i.e.: We buy a product for 10,000 Colombian pesos, but the payment gateway told us to pay 100.00 pesos.
I think the problem is in "commerce_sermepa_order_form", where we should recalculate final amount. Am I right?
$gateway->setTransactionType('0')
// Assign an order number.
->setOrder(substr(date('ymdHis') . $order->order_id, -12, 12))
// Set transaction amount.
->setAmount($order->commerce_order_total[LANGUAGE_NONE][0]['amount']) /// <<------ ???
// Set currency.
->setCurrency($settings['currency'])
// Set feedback url.
->setMerchantURL($settings['merchant_url'])
// Set merchant OK url.
->setUrlOK($settings['return'])
// Set merchant KO url.
->setUrlKO($settings['cancel_return'])
// Set customer language.
->setConsumerLanguage($settings['Ds_Merchant_ConsumerLanguage'])
// Store commerce order id in merchant data.
->setMerchantData($order->order_id);
Closed: outdated
1.4
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.