为了使用带区CLI,您必须打开浏览器并登录。我想在构建服务器上运行测试,有没有一种方法可以在不使用浏览器登录的情况下进行身份验证?
stripe config
[1]在构建服务器上设置测试模式API密钥,或在调用中传递--api-key <key>
参数。您可以从Stripe仪表板创建特定于CI的受限密钥,也可以只使用testmode可发布密钥和秘密密钥。
您可能会这样设置API密钥:
stripe config --set test_mode_api_key sk_test_xxx
stripe config --set test_mode_publishable_key pk_test_yyy
[1] https://github.com/stripe/stripe-cli/wiki/config-command