phacility/phabricator · error · Exception

There are no payment providers enabled that can add payment

Error message

There are no payment providers enabled that can add payment methods.

What it means

PhortunePaymentMethodCreateController requires at least one enabled payment provider for the target merchant that can add payment methods (implements PhortunePaymentMethodProvider and passes the enabled checks). When loadCreatePaymentMethodProvidersForMerchant() returns empty, it throws this Exception: the merchant has no usable provider configuration for storing payment methods, so the 'add payment method' page cannot be rendered.

Source

Thrown at src/applications/phortune/controller/paymentmethod/PhortunePaymentMethodCreateController.php:153

        return $this->newDialog()
          ->setTitle(pht('Choose a Merchant'))
          ->appendForm($form)
          ->appendChild($menu)
          ->addCancelButton($next_uri);
      }

      $cart = null;
      $subscription = null;
      $merchant = head($merchants);

      $cart_id = null;
      $subscription_id = null;
      $merchant_id = $merchant->getID();
    }

    $providers = $this->loadCreatePaymentMethodProvidersForMerchant($merchant);
    if (!$providers) {
      throw new Exception(
        pht(
          'There are no payment providers enabled that can add payment '.
          'methods.'));
    }

    $state_params = array(
      'cartID' => $cart_id,
      'subscriptionID' => $subscription_id,
      'merchantID' => $merchant_id,
    );
    $state_params = array_filter($state_params);

    $state_uri = new PhutilURI($request->getRequestURI());
    foreach ($state_params as $key => $value) {
      $state_uri->replaceQueryParam($key, $value);
    }

    $provider_id = $request->getInt('providerID');

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. In Phortune admin, add and enable a payment provider that supports payment methods (e.g. the Stripe test provider) for the merchant
  2. Verify the provider config is enabled and applies to the merchant in question
  3. If payment methods are not needed (pure one-time charges), do not link users to the method-creation flow
Defensive patterns

Strategy: validation

Validate before calling

// Check provider availability before linking users to the flow
$providers = $this->loadCreatePaymentMethodProvidersForMerchant($merchant);
if (!$providers) {
  return $this->newDialog()
    ->setTitle(pht('No Payment Providers'))
    ->appendParagraph(pht('An administrator must configure a payment provider.'));
}

Prevention

When it happens

Trigger: A fresh Phortune install with no provider configured; providers configured but not enabled for this specific merchant; all configured providers are charge-only (no method capability); the sole provider config disabled for testing.

Common situations: Skipping the Phortune provider setup step on new installs; disabling the test provider in production before adding a live one; merchant-scoped provider restrictions after adding a second merchant.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/4d2b3a1df53a69b4. Report an issue: GitHub.