{"record":{"id":"4d2b3a1df53a69b4","repo":"phacility/phabricator","slug":"there-are-no-payment-providers-enabled-that-can-ad","errorCode":null,"errorMessage":"There are no payment providers enabled that can add payment methods.","messagePattern":"There are no payment providers enabled that can add payment methods\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/phortune/controller/paymentmethod/PhortunePaymentMethodCreateController.php","lineNumber":153,"sourceCode":"        return $this->newDialog()\n          ->setTitle(pht('Choose a Merchant'))\n          ->appendForm($form)\n          ->appendChild($menu)\n          ->addCancelButton($next_uri);\n      }\n\n      $cart = null;\n      $subscription = null;\n      $merchant = head($merchants);\n\n      $cart_id = null;\n      $subscription_id = null;\n      $merchant_id = $merchant->getID();\n    }\n\n    $providers = $this->loadCreatePaymentMethodProvidersForMerchant($merchant);\n    if (!$providers) {\n      throw new Exception(\n        pht(\n          'There are no payment providers enabled that can add payment '.\n          'methods.'));\n    }\n\n    $state_params = array(\n      'cartID' => $cart_id,\n      'subscriptionID' => $subscription_id,\n      'merchantID' => $merchant_id,\n    );\n    $state_params = array_filter($state_params);\n\n    $state_uri = new PhutilURI($request->getRequestURI());\n    foreach ($state_params as $key => $value) {\n      $state_uri->replaceQueryParam($key, $value);\n    }\n\n    $provider_id = $request->getInt('providerID');","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/phortune/controller/paymentmethod/PhortunePaymentMethodCreateController.php#L135-L171","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["In Phortune admin, add and enable a payment provider that supports payment methods (e.g. the Stripe test provider) for the merchant","Verify the provider config is enabled and applies to the merchant in question","If payment methods are not needed (pure one-time charges), do not link users to the method-creation flow"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check provider availability before linking users to the flow\n$providers = $this->loadCreatePaymentMethodProvidersForMerchant($merchant);\nif (!$providers) {\n  return $this->newDialog()\n    ->setTitle(pht('No Payment Providers'))\n    ->appendParagraph(pht('An administrator must configure a payment provider.'));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Complete Phortune provider setup before exposing billing flows to users","Verify the provider is enabled and attached to the specific merchant","Health-check provider configs after environment migrations"],"tags":["phabricator","phortune","payments","provider","setup"],"backgroundTag":"missing-provider-configuration","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}