Skip to content

Commit

Permalink
Fix Checkout related fixtures to not use legacy line items path (#943)
Browse files Browse the repository at this point in the history
Co-authored-by: tomer-stripe <[email protected]>
  • Loading branch information
remi-stripe and tomer-stripe committed Aug 16, 2022
1 parent 1a2bbeb commit 7b5b97d
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 14 deletions.
25 changes: 21 additions & 4 deletions pkg/fixtures/triggers/checkout.session.async_payment_failed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@
"template_version": 0
},
"fixtures": [
{
"name": "product",
"path": "/v1/products",
"method": "post",
"params": {
"name": "myproduct",
"description": "(created by Stripe CLI)"
}
},
{
"name": "price",
"path": "/v1/prices",
"method": "post",
"params": {
"product": "${product:id}",
"unit_amount": "1500",
"currency": "gbp"
}
},
{
"name": "checkout_session",
"expected_error_type": "invalid_request_error",
Expand All @@ -12,12 +31,10 @@
"success_url": "https://httpbin.org/post",
"cancel_url": "https://httpbin.org/post",
"payment_method_types": ["bacs_debit"],
"mode": "payment",
"line_items": [
{
"name": "t-shirt",
"description": "comfortable cotton t-shirt",
"amount": 1500,
"currency": "gbp",
"price": "${price:id}",
"quantity": 2
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,37 @@
"template_version": 0
},
"fixtures": [
{
"name": "product",
"path": "/v1/products",
"method": "post",
"params": {
"name": "myproduct",
"description": "(created by Stripe CLI)"
}
},
{
"name": "price",
"path": "/v1/prices",
"method": "post",
"params": {
"product": "${product:id}",
"unit_amount": "1500",
"currency": "gbp"
}
},
{
"name": "checkout_session",
"path": "/v1/checkout/sessions",
"method": "post",
"params": {
"success_url": "https://httpbin.org/post",
"cancel_url": "https://httpbin.org/post",
"payment_method_types": ["card"],
"payment_method_types": ["bacs_debit"],
"mode": "payment",
"line_items": [
{
"name": "t-shirt",
"description": "comfortable cotton t-shirt",
"amount": 1500,
"currency": "usd",
"price": "${price:id}",
"quantity": 2
}
],
Expand Down
26 changes: 21 additions & 5 deletions pkg/fixtures/triggers/checkout.session.completed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,36 @@
"template_version": 0
},
"fixtures": [
{
"name": "product",
"path": "/v1/products",
"method": "post",
"params": {
"name": "myproduct",
"description": "(created by Stripe CLI)"
}
},
{
"name": "price",
"path": "/v1/prices",
"method": "post",
"params": {
"product": "${product:id}",
"unit_amount": "1500",
"currency": "usd"
}
},
{
"name": "checkout_session",
"path": "/v1/checkout/sessions",
"method": "post",
"params": {
"success_url": "https://httpbin.org/post",
"cancel_url": "https://httpbin.org/post",
"payment_method_types": ["card"],
"mode": "payment",
"line_items": [
{
"name": "t-shirt",
"description": "comfortable cotton t-shirt",
"amount": 1500,
"currency": "usd",
"price": "${price:id}",
"quantity": 2
}
],
Expand Down

0 comments on commit 7b5b97d

Please sign in to comment.