Skip to content

Commit

Permalink
Move all charge.* triggers to use the PaymentIntents API (#1106)
Browse files Browse the repository at this point in the history
Co-authored-by: etsai-stripe <88805634+etsai-stripe@users.noreply.github.com>
  • Loading branch information
remi-stripe and etsai-stripe committed Jul 21, 2023
1 parent 7d63787 commit a9d007b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
7 changes: 4 additions & 3 deletions pkg/fixtures/triggers/charge.disputed.created.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
},
"fixtures": [
{
"name": "charge",
"path": "/v1/charges",
"name": "payment_intent",
"path": "/v1/payment_intents",
"method": "post",
"params": {
"source": "tok_createDisputeInquiry",
"amount": 100,
"currency": "usd",
"payment_method": "pm_card_createDisputeInquiry",
"confirm": true,
"description": "(created by Stripe CLI)"
}
}
Expand Down
7 changes: 4 additions & 3 deletions pkg/fixtures/triggers/charge.failed.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
},
"fixtures": [
{
"name": "charge",
"name": "payment_intent",
"expected_error_type": "card_error",
"path": "/v1/charges",
"path": "/v1/payment_intents",
"method": "post",
"params": {
"source": "tok_chargeDeclined",
"amount": 100,
"currency": "usd",
"payment_method": "pm_card_visa_chargeDeclined",
"confirm": true,
"description": "(created by Stripe CLI)"
}
}
Expand Down
9 changes: 5 additions & 4 deletions pkg/fixtures/triggers/charge.refund.updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
},
"fixtures": [
{
"name": "charge",
"path": "/v1/charges",
"name": "payment_intent",
"path": "/v1/payment_intents",
"method": "post",
"params": {
"source": "tok_visa",
"amount": 100,
"currency": "usd",
"payment_method": "pm_card_visa",
"confirm": true,
"description": "(created by Stripe CLI)"
}
},
Expand All @@ -19,7 +20,7 @@
"path": "/v1/refunds",
"method": "post",
"params": {
"charge": "${charge:id}"
"payment_intent": "${payment_intent:id}"
}
},
{
Expand Down
9 changes: 5 additions & 4 deletions pkg/fixtures/triggers/charge.refunded.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
},
"fixtures": [
{
"name": "charge",
"path": "/v1/charges",
"name": "payment_intent",
"path": "/v1/payment_intents",
"method": "post",
"params": {
"source": "tok_visa",
"amount": 100,
"currency": "usd",
"payment_method": "pm_card_visa",
"confirm": true,
"description": "(created by Stripe CLI)"
}
},
Expand All @@ -19,7 +20,7 @@
"path": "/v1/refunds",
"method": "post",
"params": {
"charge": "${charge:id}"
"payment_intent": "${payment_intent:id}"
}
}
]
Expand Down
7 changes: 4 additions & 3 deletions pkg/fixtures/triggers/charge.succeeded.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
},
"fixtures": [
{
"name": "charge",
"path": "/v1/charges",
"name": "payment_intent",
"path": "/v1/payment_intents",
"method": "post",
"params": {
"source": "tok_visa",
"amount": 100,
"currency": "usd",
"payment_method": "pm_card_visa",
"confirm": true,
"description": "(created by Stripe CLI)"
}
}
Expand Down

0 comments on commit a9d007b

Please sign in to comment.