Should this extension be dead already? Yes. Is it? Sadly not.
When using authorize.net (legacy processor) with Webform-CiviCRM, you get this error:
It appears that this transaction is a duplicate. Have you already submitted the form once? If so there may have been a connection problem. Check your email for a receipt from Authorize.net. If you do not receive a receipt within 2 hours you can try your transaction again. If you continue to have problems please contact the site administrator.
This is because the dupeCheck()
is looking for contributions that have the same invoice_id
but aren't the contribution specified in $params['contributionID']
. But the ID is passed in from this extension in $params['contribution_id']
. So the dupe check finds the pending contribution and returns this error. So now we pass in the ID with both array keys.
I believe the authnet
extension suffers from a different failure on the dupe check. I'm confirming that in a few minutes, and may submit a PR there as well.
more from errors log for stripe:
Stripe(3): process_paymentintent: Stripe\Exception\InvalidRequestException: A `return_url` must be specified because this Payment Intent is configured to automatically accept the payment methods enabled in the Dashboard, some of which may require a full page redirect to succeed. If you do not want to accept redirect-based payment methods, set `automatic_payment_methods[enabled]` to `true` and `automatic_payment_methods[allow_redirects]` to `never` when creating Setup Intents and Payment Intents.
A string for field {dbName} has been truncated. The original string was {value}. Array ( [dbName] => description [value] => req_GsjlyOssoiPyGa;A `return_url` must be specified because this Payment Intent is configured to automatically accept the payment methods enabled in the Dashboard, some of which may require a full page redirect to succeed. If you do not want to accept redirect-based payment methods, set `automatic_payment_methods[enabled]` to `true` and `automatic_payment_methods[allow_redirects]` to `never` when creating Setup Intents and Payment Intents.;test_event )
My setup: Civi: 5.65.1 Stripe: 6.9.3 Contribution legacy API: 1.5.1 Drupal 7 latest with all updated modules.
When submitting payment using webform and Stripe Checkout, I get the following error:
webform_civicrm : The CiviCRM "line_item create" API returned the error: "'Event Fee' is not a valid option for field financial_type_id" when called by function "postSave" on line 234 of wf_crm_webform_postprocess.inc with parameters: "Array ( [qty] => 1 [entity_table] => civicrm_participant [event_id] => 339 [contact_ids] => Array ( [0] => 0 ) [unit_price] => 25 [element] => civicrm_3_participant_1_participant_339-5 [contact_label] => test [label] => test - test_event [financial_type_id] => Event Fee [line_total] => 25 [entity_id] => 5612 [participant_id] => 5612 [participant_count] => 1 [contribution_id] => 55309 [price_field_id] => 1 [check_permissions] => [version] => 3 ) "
PHP: CRM_Core_Exception: entity_id is not a valid integer in civicrm_api3() (line 135 of /example.com/sites/all/modules/civicrm/api/api.php).
Civicrm: Stripe(4): create_customer: Stripe\Exception\InvalidRequestException: No such customer: 'cus_GxqHJbShnNtUNpi' Failed to create Stripe Customer: An error occurred; Array ( [code] => [message] => An error occurred ) Stripe Contact update failed: Failed to update Stripe Customer:
When submitting payment using webform and Stripe, I get the following error:
civicrm : paymentIntentID not found. $params: Civi\Payment\PropertyBag Object ( [props:protected] => Array ( [default] => Array ( [receive_date] => 20230917130153 [skipLineItem] => 1 [email] => a@b.com [contribution_page_id] => 42 [payment_processor_id] => 3 [is_test] => 0 [financial_type_id] => 46 [currency] => GBP [skipRecentView] => 1 [contactID] => 8949 [total_amount] => 25 [invoiceID] => a27d87dbc6aafbe33a68ddcbb8a254ae [tax_amount] => 0 [description] => Webform Payment: test_event [financialType_name] => test [financialTypeID] => 46 [non_deductible_amount] => 0 [submitted] => Array ( [contribution_pagebreak] => Payment [civicrm_1_contribution_1_contribution_contribution_page_id] => 42 [civicrm_1_contribution_1_contribution_payment_processor_id] => Array ( [3] => 3 ) ) [details] => Array ( [sid] => [page_num] => 3 [page_count] => 3 [finished] => 0 ) [form_build_id] => form-qdMjM3SlyF_6a4GeKHWqgPdeDBOInABbkMyZBj6r4ZQ [form_id] => webform_client_form_52 [captcha_sid] => 1526175 [captcha_token] => 6f4b9716788e17ae9c0b445e711bad0c [op] => Submit [payment_instrument_id] => 1 [payment_processor] => 3 [check_permissions] => [version] => 3 [contribution_status_id] => Pending [amount] => 25 [contributionID] => 55310 [isRecur] => [error_url] => [setupIntentID] => [paymentMethodID] => [paymentIntentID] => ) ) [logs] => Array ( ) [ignoreDeprecatedWarningsInFunction] => [suppressLegacyWarnings:protected] => 1 [lastWarning] => )
Stripe(4): create_customer: Stripe\Exception\InvalidRequestException: No such customer: 'cus_GxqHJbShnNtUNpi' Failed to create Stripe Customer: An error occurred; Array ( [code] => [message] => An error occurred ) Stripe Contact update failed: Failed to update Stripe Customer:
Any help would be appreciated how to fix it please. Thanks
In the activities for each contact that pays, I see two activities now - one of type 'contribution' and one of type 'payment'
Under 'payments', I see only the payment.
Is this as designed ?
Simply uncommenting the
$this->checkDupe
does seem to make payments work on the dev server sofar. Does anyone foresee any problems with that ?
I seem to have a problem with, CiviCRM 5.50.3, webform_civicrm 7.x-5.8 and this extension. See
https://civicrm.stackexchange.com/questions/42236/payment-forms-fail-with-unknown-api-version/42238
https://www.drupal.org/project/webform_civicrm/issues/3294171
With this extension on, all transactions end in
It appears that this transaction is a duplicate.
I am using Authorize.net, so the error likely comes from
civicrm/CRM/Core/Payment/AuthorizeNet.php:172
// Authorize.Net will not refuse duplicates, so we should check if the user already submitted this transaction
if ($this->checkDupe($authorizeNetFields['x_invoice_num'], $params['contributionID'] ?? NULL)) {
throw new PaymentProcessorException('It appears that this transaction is a duplicate.
the data there looks fine when vardumped.
checkDupe (civicrm/CRM/Core/Payment.php:1702) checks for a CRM_Contribute_DAO_Contribution
with the same $invoiceId and $contributionID and when checking manually, that contribution indeed does exist in the table. It looks ok and has contribution_status_id 4 (after the error occured).
I notice in release 1.5 you fixed a bug mentioning
Check the payment completed before creating payment record.
Is this related ?
mattwire (10a5c429) at 13 Feb 17:38
Update docs
mattwire (10a5c429) at 13 Feb 17:37
Update docs
mattwire (079cb669) at 13 Feb 17:36
Some payment processors can't cope with propertyBag yet. Pass in as...
mattwire (d3120e81) at 28 Jan 12:32
Update release
mattwire (e4799b75) at 24 Jan 10:39
Drop support for CiviCRM < 5.35
mattwire (e4e01616) at 12 Apr 22:20
Release 1.4.1
mattwire (e4e01616) at 12 Apr 22:19
Release 1.4.1