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);
}
CommentFileSizeAuthor
#2 charge-2621566-2.patch688 byteswuinfo - Bill Wu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

casperloc76 created an issue. See original summary.

wuinfo - Bill Wu’s picture

FileSize
688 bytes

Thanks @casperloc76

  • wuinfo committed 4c0235a on 7.x-2.x authored by casperloc76
    Issue #2621566 by wuinfo, casperloc76: $charge['amount'] set to zero...
wuinfo - Bill Wu’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.