• Resolved allwebnow

    (@allwebnow)


    Hi,

    We’re running the “Payment gateway: accept.blue for WooCommerce” plugin (version 1.6.0) on drycleanersoap.com. When we enable the Surcharge option under Accept Blue Credit Card settings, every credit card checkout attempt fails with a fatal error and never reaches your API.

    Error log:

    Uncaught Error: Call to undefined function Devurai\AcceptbluePaymentPro\Surcharge\wcs_order_contains_renewal()
    in /home/user/public_html/wp-content/plugins/payment-gateway-accept-blue-for-woocommerce/modules/Surcharge/Surcharge.php:144

    It looks like Surcharge.php calls wcs_order_contains_renewal() unconditionally, but that function is only defined if WooCommerce Subscriptions is installed — which it isn’t on our site. This breaks credit card checkout entirely whenever Surcharge is enabled.

    We’ve disabled Surcharge for now to restore checkout. Can you confirm this is a known issue and let us know when a fix is available?

    Thanks,
    Ben

    • This topic was modified 3 weeks, 1 day ago by allwebnow.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter allwebnow

    (@allwebnow)

    Following up on the fatal error I reported earlier today (wcs_order_contains_renewal / wcs_order_contains_subscription undefined function errors) — after working around those, checkout now completes, but the Surcharge feature has two more issues:

    1. Incorrect calculation base. The 3% surcharge is being calculated on the product subtotal only, not the full order total. Example from a test order: product subtotal $42.50, shipping $15.00, tax $3.45. Surcharge charged was $1.28 (3% of $42.50 only). It should be $1.83 (3% of the full $60.95 pre-surcharge total — product + shipping + tax).

    2. No live display at checkout. The surcharge amount never appears as a line item on the checkout page, and the order total shown to the customer before they submit payment doesn’t update to include it. Only a static text note appears (“a 3% surcharge will be added to your order”). The actual surcharge amount only shows up afterward, on the generated invoice. This is a problem for both customer transparency and card network surcharge disclosure requirements, which require the surcharge to be shown as a separate line item with the total updated before the customer submits payment.

    Is there a fix planned for either of these, or a setting I’m missing that controls the calculation base?

    Thanks,
    Ben

    Plugin Author mykolasolop

    (@mykolasolop)

    Hi Ben,

    Thanks for the detailed reports — both are confirmed, and here’s where things stand on all three issues:

    1. Fatal error on checkout: Fixed. The fix guards those calls and is included in version 1.6.2. You can re-enable Surcharge after updating.
    2. Incorrect calculation base: Fixed. The surcharge was calculating 3% on the product subtotal only; it now applies to the full pre-surcharge total (products + shipping + tax), so your test case would correctly charge $1.83 on $60.95.
    3. No live display at checkout: There’s no update planned for this at the moment — the surcharge will continue to show as a static notice at checkout, with the actual amount reflected on the invoice afterward. If you need it shown as a dynamic line item at checkout (e.g., for surcharge disclosure compliance), that would require a custom solution — feel free to reach out to info@devurai.com to discuss.

    Thanks again for the clear reports, Ben — they made these easy to track down.

    Best regards,
    Mykola

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.