AccountsController
AccountsController
Manages Marketplace gateway (ie. Stripe) accounts.
- Full name:
\kennethormandy\marketplace\console\controllers\AccountsController
- Parent class:
Controller
Properties
defaultAction
public $defaultAction
elementId
public null|int $elementId
accountId
public null|string $accountId
Methods
options
public options(mixed $actionId): array
Parameters:
Parameter | Type | Description |
---|---|---|
$actionId | mixed |
actionIndex
Does nothing.
public actionIndex(): int
actionReplace
Manually replace an account ID, ex. from Live to Test.
public actionReplace(): int
This is intended to be used in staging and development environments, where you’ll likely need to replace production account IDs (ex. from Stripe Live mode) with test account IDs (ie. from Stripe Test mode).
Example:
php craft marketplace/accounts/replace --element-id 123 --account-id acct_aAbBcCdDEeFfGgHh
…where 123
is an account, ie. an element with a Marketplace Connect Button field, and
acct_aAbBcCdDEeFfGgHh
is the new account ID you want it to contain.
Currently, this isn’t validated using Stripe, ie. it is possible to give this command an invalid account ID that doesn’t exist on your Stripe account.
actionRemove
Manually remove an account ID, so a new one can be created.
public actionRemove(): int
Note this doesn’t disconnect the account from the platform—it simply removes the ID, ex. if you wanted to run through the account onboarding process again in a different environment.
Automatically generated on 2024-11-13