Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When using the card on file integration I'm seeing an error where payments are failing because the charge amount is set to zero. I traced the error to function commerce_elavon_direct_cardonfile_charge in commerce_elavon.module on line 390. The function commerce_payment_order_balance can return a zero amount for the $charge variable. Below is the updated code that fixed the issue for me.
if (!isset($charge)) {
$wrapper = entity_metadata_wrapper('commerce_order', $order);
$charge = commerce_line_items_total($wrapper->commerce_line_items);
}
Comment | File | Size | Author |
---|---|---|---|
#2 | charge-2621566-2.patch | 688 bytes | wuinfo - Bill Wu |
Comments
Comment #2
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu for Wulei Info Technology Solutions commentedThanks @casperloc76
Comment #4
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu for Wulei Info Technology Solutions commented