我想在本地Windows开发机上测试stripe Webhooks,stripe文档提到stripe CLI是测试Webhooks端点和发送虚假事件的最佳/更容易的方法,我按照文档将stripe CLI下载到我的Windows机器中,我将可执行文件提取到我的桌面,但现在我不知道如何在cmd中正确执行命令。
我的桌面上有stripe.exe,我首先尝试简单地点击它,命令提示符打开并显示以下消息,在几秒钟后命令提示符关闭。
This is a command line tool.
You need to open cmd.exe and run it from there.
之后我尝试打开一个CMD窗口,将stripe.exe拖放到选项卡中,我得到了以下命令列表:
C:\Users\GABRIEL>C:\Users\GABRIEL\Desktop\stripe.exe
The official command-line tool to interact with Stripe.
Before using the CLI, you'll need to login:
$ stripe login
If you're working on multiple projects, you can run the login command with the
--project-name flag:
$ stripe login --project-name rocket-rides
Usage:
stripe [command]
Webhook commands:
listen Listen for webhook events
trigger Trigger test webhook events
Stripe commands:
logs Interact with Stripe API request logs
status Check the status of the Stripe API
Resource commands:
get Quickly retrieve resources from Stripe
charges Make requests (capture, create, list, etc) on charges
customers Make requests (create, delete, list, etc) on customers
payment_intents Make requests (cancel, capture, confirm, etc) on payment intents
... To see more resource commands, run `stripe resources help`
Other commands:
completion Generate bash and zsh completion scripts
config Manually change the config values for the CLI
feedback Provide us with feedback on the CLI
fixtures Run fixtures to populate your account with data
help Help about any command
login Login to your Stripe account
logout Logout of your Stripe account
open Quickly open Stripe pages
samples Sample integrations built by Stripe
serve Serve static files locally
version Get the version of the Stripe CLI
Flags:
--api-key string Your API key to use for the command
--color string turn on/off color output (on, off, auto)
--config string config file (default is
$HOME/.config/stripe/config.toml)
--device-name string device name
-h, --help help for stripe
--log-level string log level (debug, info, warn, error)
(default "info")
-p, --project-name string the project name to read from for config
(default "default")
-v, --version Get the version of the Stripe CLI
Use "stripe [command] --help" for more information about a command.
C:\Users\GABRIEL>
正如您所见,我无法输入任何命令,例如
stripe login
我在命令行中无法使用Stripe CLI执行任何操作。