Comments (17)
Due to the issue I believe we will exceptionally release a 2.8.5 with migrations included.
from dj-stripe.
This is fixed in 2.9.0a1 which was released recently, please test that release (note: it has not been tested in production yet, please create issues with all feedback).
from dj-stripe.
I am also running into this issue. It appears to be stemming from the capture_method
field value of automatic_async
which was indeed added in the latest Stripe API: https://docs.stripe.com/upgrades#2024-04-10
I have found that the following migration file, which increases the length of the field to 255 characters temporarily fixes it.
# Generated by Django 5.0.3 on 2024-04-16 12:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("djstripe", "0012_2_8"),
]
operations = [
migrations.RunSQL(
"ALTER TABLE djstripe_paymentintent ALTER COLUMN capture_method TYPE varchar(255);"
),
]
A simple solution in the library would be to bump up the length of the field. I will submit a PR for that.
from dj-stripe.
Hello @jleclanche, any update for this? I'm facing the same issue.
from dj-stripe.
Thank you for the quick response @Jenselme 👍 we're waiting this updates.
from dj-stripe.
@jleclanche very appreciated, thank you for your work.
from dj-stripe.
@jleclanche would it be helpful for me to add the migration to #2040?
from dj-stripe.
@czue Yes please go for it.
from dj-stripe.
@jleclanche migration added. also created a PR into the stable/2.8 branch (#2041) as I wasn't totally sure where it should go.
from dj-stripe.
@jleclanche I believe we need to include all migration files in the new release version, the reason is for old dj-stripe versions who had migration files need to clear the django_migrations
table, and then migrate again.
docker exec -it <postgres_container_name_or_id> psql -U <username> <database_name>
DROP TABLE django_migrations;
then;
python manage.py migrate --fake
from dj-stripe.
Hello @jleclanche sorry to ping you again. When we expect the new release will happens?
as it impacted the important events for the webhook listener, such as:
charge.succeeded
invoice.payment_succeeded
payment_intent.succeeded
from dj-stripe.
@agusmakmun if you're needing a patch urgently you can always add a migration like the one mentioned above to any of your Django apps. I would expect it to fix the issue and be compatible with any future migration that ships in djstripe
from dj-stripe.
@jleclanche sorry to pester, but just wondering what the steps are to go from #2040 or #2041 to a release, and whether there's anything I can do to help move things along?
At the moment anyone who uses this library with a new Stripe account will get all kinds of errors in webhooks (and maybe other places). Not a great experience.
from dj-stripe.
Note that stripe support can downgrade your API level if you ask them, that's another way of getting dj-stripe working right now.
from dj-stripe.
Folks, I'm going to try to get a release to happen ASAP but I'm swamped IRL right now.
If you need to run this in production, you can write the following in your SQL db:
alter table djstripe_paymentintent alter column capture_method type character varying(15);
I haven't tested it but it should work as-is and be forward-compatible with future migrations.
from dj-stripe.
@jleclanche awesome, thanks! What's the easiest way for me to see what else is in that release?
from dj-stripe.
It's all here: https://github.com/dj-stripe/dj-stripe/blob/stable/2.9/docs/history/2_9_0.md
from dj-stripe.
Related Issues (20)
- When installing for the first time and running migrate: AttributeError: module 'stripe' has no attribute 'Order' HOT 6
- ProgrammingError: column djstripe_product.default_price_id does not exist HOT 7
- Use case for multiple API Keys? HOT 9
- Plugin 'mkdocstrings' option 'watch' is breaking the docs HOT 2
- Failing webhook events in dj-stripe regarding Plan and Price HOT 2
- Having multiple projects breaks the webhook HOT 1
- The stripe api key placement is very confusing HOT 14
- Use AbstractModels HOT 1
- Webhook doesn't work if API keys removed from .env HOT 2
- Current state of the projects Documentation/Website
- v2.9 Release Checklist HOT 2
- Sync only Subscriptions with specific status HOT 2
- Initial Sync Fails to Import Charge data from Connect Express Accounts
- Re-enable Migration Check in Linter Action for Release 3.0
- Support an upgrade from 2.X HOT 4
- Webhooks for some users are failing after library update from 2.5 to 2.8 HOT 2
- Errors when manually running djstripe_sync_models
- API change for Sepa payments in their source api HOT 1
- Enhance Admin Interface to Dynamically Include All Properties as Read-Only Fields HOT 1
- Impossible to install dj-stripe to my django project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dj-stripe.