Local Smoke Testing
This project should be smoke-tested against the local WooPayments development site at http://localhost:8082 when available.
Create a temporary WooCommerce REST API key
From /Users/mal/projects/wcpay:
bash
docker compose exec -T wordpress bash -lc 'cd /var/www/html && wp eval '\''global $wpdb; $user_id = 1; $consumer_key = "ck_" . wc_rand_hash(); $consumer_secret = "cs_" . wc_rand_hash(); $wpdb->insert( $wpdb->prefix . "woocommerce_api_keys", array( "user_id" => $user_id, "description" => "wcpay-cli smoke test " . gmdate("c"), "permissions" => "read_write", "consumer_key" => wc_api_hash( $consumer_key ), "consumer_secret" => $consumer_secret, "truncated_key" => substr( $consumer_key, -7 ) ), array( "%d", "%s", "%s", "%s", "%s", "%s" ) ); echo wp_json_encode( array( "key_id" => $wpdb->insert_id, "consumer_key" => $consumer_key, "consumer_secret" => $consumer_secret ) );'\'' --allow-root'Delete it afterwards:
bash
docker compose exec -T wordpress bash -lc 'cd /var/www/html && wp eval '\''global $wpdb; $wpdb->delete( $wpdb->prefix . "woocommerce_api_keys", array( "key_id" => YOUR_KEY_ID ), array( "%d" ) );'\'' --allow-root'Smoke commands
From /Users/mal/projects/wcpay-cli:
bash
npm run build
TMP_WCPAY_HOME=$(mktemp -d)
WCPAY_HOME=$TMP_WCPAY_HOME WCPAY_KEYRING=0 \
node dist/cli.js login \
--site http://localhost:8082 \
--consumer-key ck_... \
--consumer-secret cs_... \
--json
WCPAY_HOME=$TMP_WCPAY_HOME WCPAY_KEYRING=0 node dist/cli.js auth list --json
WCPAY_HOME=$TMP_WCPAY_HOME WCPAY_KEYRING=0 node dist/cli.js doctor --json
WCPAY_HOME=$TMP_WCPAY_HOME WCPAY_KEYRING=0 node dist/cli.js mode --json
WCPAY_HOME=$TMP_WCPAY_HOME WCPAY_KEYRING=0 node dist/cli.js account status --json
WCPAY_HOME=$TMP_WCPAY_HOME WCPAY_KEYRING=0 node dist/cli.js settings get --json
WCPAY_HOME=$TMP_WCPAY_HOME WCPAY_KEYRING=0 node dist/cli.js refunds create --order 123 --amount 500 --dry-run --json
WCPAY_HOME=$TMP_WCPAY_HOME WCPAY_KEYRING=0 node dist/cli.js test order create --product 123 --quantity 1 --dry-run --json2026-06-11 result
Validated the 0.2.4 release branch against the local WooPayments site (dev mode, connected test account), using a temporary read/write key and an isolated WCPAY_HOME:
doctorpassed 7/7 checks;modereturneddev.transactions listrendered live data with currency-formatted amounts (£125.00,-£30.00);transactions summary,disputes summary,deposits overview, andauthorizations list/summaryall returned live data.orders getsurfaced_intent_id,_charge_id, and_wcpay_modefrom order meta.--verboseprinted redacted request/response lines; consumer key and OAuth signature redacted.refunds create --dry-runanddisputes close --dry-runpassed the dev-mode guard and printed redacted requests without sending.- Exit codes observed live:
2(missing--yes/--dry-run,--allwith--page, unsupported completion shell),3(invalid consumer key),4(API errors and--timeout 1against an unreachable host). WCPAY_SITE_URL/WCPAY_CONSUMER_KEY/WCPAY_CONSUMER_SECRETenv auth worked with no stored profile.- MCP over stdio reported the package version, listed all 16 tools, and
wcpay_get_modereturned live data. - Note:
timeline getandpayment-intents getcould only be plumbing-checked — the local platform server fixtures only seed the transactions list, so intent lookups 404 (as does the pre-existingcharges geton fixture IDs).
2026-05-22 result
Validated successfully against the local WooPayments site with a connected test/dev account:
- Created a temporary WooCommerce REST API key and deleted it after testing.
wcpay login --jsonwith explicit credentials worked againsthttp://localhost:8082.wcpay auth list --jsonreturned the temporary profile.wcpay doctor --jsonpassed profile, site URL, auth, and mode checks.wcpay mode --jsonreturneddevmode withis_test_mode_enabled,is_test_mode_onboarding, andis_dev_mode_enabledall true.wcpay account status --jsonreturned a connected test account.wcpay settings get --jsonreturned WooPayments settings successfully.wcpay refunds create --dry-run --jsonpassed the test/dev-mode guard and printed a redacted POST request without sending it.wcpay test order create --dry-run --jsonpassed the test/dev-mode guard and printed a redacted POST request without sending it.wcpay mcp --helpprinted the MCP command help.
2026-05-21 result
Validated successfully against the local WooPayments site:
wcpay loginwith explicit credentials worked.- HTTP local OAuth signing worked.
wcpay mode --jsonreturneddevmode withis_test_mode_enabled,is_test_mode_onboarding, andis_dev_mode_enabledall true.wcpay account status --jsonreturned successfully withdata: falsefor the current disconnected/local account state.wcpay refunds create --dry-run --jsonpassed the test/dev-mode guard and printed a redacted POST request without sending it.wcpay test order create --dry-run --jsonpassed the test/dev-mode guard and printed a redacted POST request without sending it.