Can't change billing details
When trying to use the "change billing details" option in a membership, a there was some problem updating the billing details error message, as shown in the screenshot:
With a step-by-step debugging session, I found that CRM_Core_Payment_Smartdebit
::updateSubscriptionBillingInfo isn't properly reading the subscription reference:
In particular, it's receiving the subscription reference in the $params
array as ddi_reference
but reading it as subscriptionId
. The consequences I've found are:
-
that's causing the call to CRM_Smartdebit_Api::requestUpdate to be done with
NULL
as a reference, -
later, CRM_Smartdebit_Api::requestUpdate is building the SmartDebit API call without a reference:
$url = CRM_Smartdebit_Api::buildUrl($paymentProcessor, 'api/ddi/variable/' . $reference);
The line above should be generating a URL like api/ddi/variable/REF001234
but it's generating something like api/ddi/variable
instead.
Environment
- CiviCRM 5.35.1 (also happens with 5.36.1)
- SmartDebit 1.38
- MJWShared 0.9.12