Unable to complete payment! Missing paymentMethodID - contribution page for pledge payments
- Drupal 7.88
- CiviCRM 5.40.2
- Stripe 6.6.2
- MJW Shared 1.0.1
A contribution page for setting up pledge payments, with confirmation page, in test mode. Tested using two basic test card numbers and two regulatory (3d secure) test card numbers from https://stripe.com/docs/testing#regulatory-cards
When initially submitting the form, get the message that it's pre-authorizing the card. The JSON returned from the auth call includes a "payment_method_id" property. During the final submit of the form, get the message "Unable to complete payment! Missing paymentMethodID" and get dumped into /civicrm/admin/contribute?reset=1. Log shows...
Mar 02 21:09:40 [debug] paymentMethodID not found. $params: Civi\Payment\PropertyBag Object ( [props:protected] => Array ( [default] => Array ( [qfKey] => CRMContributeControllerContribution2rdj9v7q5ou8ko08ogo0owwos4s0css0cs88wc48ks4o4ockg8_406 [entryURL] => https://redacted.com/civicrm/contribute/transact?reset=1&action=preview&id=120&cid=0 [firstName] => Dave [lastName] => Reedy [email-Primary] => redacted [hidden_processor] => 1 [payment_processor_id] => 22 [select_contact_id] => 26527 [priceSetId] => 1537 [price_1802] => 4799 [is_pledge] => 1 [pledge_installments] => 7 [pledge_frequency_interval] => 1 [pledge_frequency_unit] => week [MAX_FILE_SIZE] => 536870912 [ip_address] => redacted [amount] => 7 [amount_level] => 7 x weekly payments [currency] => GBP [paymentIntentID] => pi_3KYzPKJO1RCosWLr0XeAm1ja [is_pay_later] => 0 [invoiceID] => 27ce31a1ed13702d00449273b76e12c4 [is_quick_config] => 1 [email] => redacted [description] => test payment page from scratch [isRecur] => 1 [auto_renew] => 1 [recurFrequencyUnit] => week [recurFrequencyInterval] => 1 [recurInstallments] => 7 [skipLineItem] => 0 [line_item] => Array (  => Array (  => Array ( [price_field_id] => 1802 [price_field_value_id] => 4799 [label] => 7 x weekly payments [field_title] => Payments [description] => [qty] => 1 [unit_price] => 7.000000000 [line_total] => 7 [participant_count] => 0 [max_value] => [membership_type_id] => [membership_num_terms] => [auto_renew] => [html_type] => Radio [financial_type_id] => 9 [tax_amount] => 0 [non_deductible_amount] => 0.00 ) ) ) [financialTypeID] => 9 [financial_type_id] => 9 [contributionType_name] => Training course fee [financialType_name] => Training course fee [contributionPageID] => 120 [contactID] => 26527 [payment_instrument_id] => 1 [item_name] => Online Payment: test payment page from scratch [contributionID] => 92628 [contributionRecurID] => 8618 [error_url] => /civicrm/contribute/transact?reset=1&action=preview&id=120&cid=0&_qf_Main_display=1&qfKey=CRMContributeControllerContribution2rdj9v7q5ou8ko08ogo0owwos4s0css0cs88wc48ks4o4ockg8_406 [paymentMethodID] => ) ) [suppressLegacyWarnings:protected] => 1 [lastWarning] => )
The value shown for paymentIntentID is the same value that was returned in the pre-auth JSON for payment_method_id. Both a contribuiton and recurring contribution that get created are left in a "pending or free trial" status.
Please let me know if you need more information or if there is something you would like me to try. Thanks.