stripe / vscode-stripe

Stripe for Visual Studio Code
MIT License
123 stars 32 forks source link

Checkout event trigger #631

Closed apm-dev closed 2 years ago

apm-dev commented 2 years ago

Issue Type: Bug

Hi, when try to create checkout or trigger any checkout event, it returns this error:

In order to use Checkout, you must set an account or business name at https://dashboard.stripe.com/account.

Note: I'm using test keys.

Request body:

{
  "_meta": {
    "template_version": 0,
    "exclude_metadata": false
  },
  "fixtures": [
    {
      "name": "checkout_session",
      "expected_error_type": "",
      "path": "/v1/checkout/sessions",
      "method": "post",
      "params": {
        "mode": "payment",
        "cancel_url": "https://httpbin.org/post",
        "line_items": [
          {
            "price": "price_1LSiPxENF0KEoTtqup5uqdGF",
            "quantity": 1
          }
        ],
        "payment_intent_data": {
          "shipping": {
            "address": {
              "city": "San Francisco",
              "country": "US",
              "line1": "510 Townsend St",
              "postal_code": "94103",
              "state": "CA"
            },
            "name": "Jenny Rosen"
          }
        },
        "payment_method_types": [
          "card"
        ],
        "success_url": "https://httpbin.org/post"
      }
    },
    {
      "name": "payment_page",
      "expected_error_type": "",
      "path": "/v1/payment_pages/${checkout_session:id}",
      "method": "get",
      "params": null
    },
    {
      "name": "payment_method",
      "expected_error_type": "",
      "path": "/v1/payment_methods",
      "method": "post",
      "params": {
        "billing_details": {
          "email": "stripe@example.com"
        },
        "card": {
          "token": "tok_visa"
        },
        "type": "card"
      }
    },
    {
      "name": "payment_page_confirm",
      "expected_error_type": "",
      "path": "/v1/payment_pages/${checkout_session:id}/confirm",
      "method": "post",
      "params": {
        "expected_amount": 3000,
        "payment_method": "${payment_method:id}"
      }
    }
  ],
  "env": null
}

Extension version: 2.0.12 VS Code version: Code 1.69.2 (Universal) (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:57.074Z) OS version: Darwin x64 21.6.0 Restricted Mode: No

A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonvspyt551:30345470 pythonptprofiler:30281270 vsdfh931cf:30280410 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 vscscmwlcmt:30465135 cppdebug:30492333 pylanb8912cf:30529770 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 ```
tomer-stripe commented 2 years ago

Hi @apm-dev, just to double check are you able to set your account name in the dashboard? I think that fixture works for me so wonder if setting the name helps.

apm-dev commented 2 years ago

Hi @apm-dev, just to double check are you able to set your account name in the dashboard? I think that fixture works for me so wonder if setting the name helps.

Hi, fixed. As you said, the problem was account name. :)) Thanks.