0

Seemingly after updating CiviCRM to 5.50.3 and webform_civicrm to 7.x-5.8 on drupal 7.83, webform payments fail. Watchdog says

The CiviCRM "contribution transact" API returned the error: "Unknown api version" 
when called by function "validate" on line 97 of wf_crm_webform_postprocess.inc 
with parameters: "Array ( [credit_card_type] => MasterCard [credit_card_number] => xxxxxxxxxx...[snip]
[form_token] => qnqM4nlUWJSVIPZiCsb57jdigsIZ76jGiG0Aa9a6nyc [form_id] => 
webform_client_form_2556 [op] => Submit [payment_instrument_id] => 1 [payment_processor] 
=> 5 [card_type_id] => 2 [pan_truncation] => 7947 [check_permissions] => [version] => 3 )

As a result, it appears everything to be handled after payment is not done, storing the payment in civicrm, sending mails/invoices, adding contacts to groups, etc - however, strangely, the payment seems to have been done.

Assuming this string "Unknown api version" comes from Civi/API/Request.php, https://lab.civicrm.org/dev/core/-/blob/fb87724ca7f9fd42560e0729e9e46a3c...

it seems $params['version'] is not 3 or 4.

It is clear in the error message version is either 3 or '3' - I can't see where the value comes from in function contributionParams - if it comes from a post, it might be a string?

@see https://www.drupal.org/project/webform_civicrm/issues/3294171

1 Answer 1

1

Do you have https://civicrm.org/extensions/contribution-transact-api installed? You need that now if using webform with contributions.

4
  • Thanks os much ! How could I have known ?! yes, that changes the error. I am testing on a development server, and not sure if all my settings are right. it now keeps telling me It appears that this transaction is a duplicate even when using different amounts. Do you know if there is anything else I need to configure to have wf_civicrm work with the contribution-transact-api ?
    – commonpike
    Jul 4, 2022 at 20:15
  • I'm not aware of anything else.
    – Demerit
    Jul 4, 2022 at 20:59
  • It has the same errors on live ..
    – commonpike
    Jul 5, 2022 at 7:14
  • @commonpike See if github.com/civicrm/civicrm-core/pull/25020 fixes the "transaction is a duplicate" issue? Nov 21, 2022 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.