-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update default payment method on subscription for user (#630)
- Loading branch information
1 parent
555a041
commit c3824bd
Showing
4 changed files
with
138 additions
and
8 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
...s/views/cassetes/test_account_viewset/AccountViewSetTests/test_update_payment_method.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
interactions: | ||
- request: | ||
body: default_payment_method=pm_123 | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '29' | ||
Content-Type: | ||
- application/x-www-form-urlencoded | ||
Idempotency-Key: | ||
- 7c40f9e9-3a01-4109-87bf-3218dfbcf27f | ||
Stripe-Version: | ||
- '2024-04-10' | ||
User-Agent: | ||
- Stripe/v1 PythonBindings/9.6.0 | ||
X-Stripe-Client-User-Agent: | ||
- '{"bindings_version": "9.6.0", "lang": "python", "publisher": "stripe", "httplib": | ||
"requests", "lang_version": "3.12.4", "platform": "Linux-6.6.31-linuxkit-aarch64-with-glibc2.36", | ||
"uname": "Linux 2b87f96d1995 6.6.31-linuxkit #1 SMP Thu May 23 08:36:57 UTC | ||
2024 aarch64 "}' | ||
method: POST | ||
uri: https://api.stripe.com/v1/subscriptions/djfos | ||
response: | ||
body: | ||
string: "{\n \"error\": {\n \"code\": \"resource_missing\",\n \"doc_url\": | ||
\"https://stripe.com/docs/error-codes/resource-missing\",\n \"message\": | ||
\"No such PaymentMethod: 'pm_123'\",\n \"param\": \"default_payment_method\",\n | ||
\ \"request_log_url\": \"https://dashboard.stripe.com/test/logs/req_xT5h1VWY7P75Lu?t=1719007484\",\n | ||
\ \"type\": \"invalid_request_error\"\n }\n}\n" | ||
headers: | ||
Access-Control-Allow-Credentials: | ||
- 'true' | ||
Access-Control-Allow-Methods: | ||
- GET,HEAD,PUT,PATCH,POST,DELETE | ||
Access-Control-Allow-Origin: | ||
- '*' | ||
Access-Control-Expose-Headers: | ||
- Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, | ||
X-Stripe-Privileged-Session-Required | ||
Access-Control-Max-Age: | ||
- '300' | ||
Cache-Control: | ||
- no-cache, no-store | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '346' | ||
Content-Security-Policy: | ||
- report-uri https://q.stripe.com/csp-report?p=v1%2Fsubscriptions%2F%3Asubscription_exposed_id; | ||
block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action | ||
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; | ||
style-src 'self' | ||
Content-Type: | ||
- application/json | ||
Cross-Origin-Opener-Policy-Report-Only: | ||
- same-origin; report-to="coop" | ||
Date: | ||
- Fri, 21 Jun 2024 22:04:44 GMT | ||
Idempotency-Key: | ||
- 7c40f9e9-3a01-4109-87bf-3218dfbcf27f | ||
Original-Request: | ||
- req_xT5h1VWY7P75Lu | ||
Report-To: | ||
- '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report?s=billing-api-srv"}],"include_subdomains":true}' | ||
Reporting-Endpoints: | ||
- coop="https://q.stripe.com/coop-report?s=billing-api-srv" | ||
Request-Id: | ||
- req_xT5h1VWY7P75Lu | ||
Server: | ||
- nginx | ||
Strict-Transport-Security: | ||
- max-age=63072000; includeSubDomains; preload | ||
Stripe-Version: | ||
- '2024-04-10' | ||
Vary: | ||
- Origin | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Stripe-Priority-Routing-Enabled: | ||
- 'true' | ||
X-Stripe-Routing-Context-Priority-Tier: | ||
- api-testmode | ||
status: | ||
code: 400 | ||
message: Bad Request | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters