question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding a card fails in 2.4.1

See original GitHub issue

After upgrading to 2.4.1, I’m seeing an AttributeError when attempting to add a new card to the customer object:

django_1        |   File "/app/project/stripe/views.py", line 64, in post
django_1        |     customer.add_card(source)
django_1        |   File "/usr/local/lib/python3.6/site-packages/djstripe/models/core.py", line 963, in add_card
django_1        |     new_stripe_payment_method = stripe_customer.sources.create(source=source)
django_1        |   File "/usr/local/lib/python3.6/site-packages/stripe/stripe_object.py", line 92, in __getattr__
django_1        |     raise AttributeError(*err.args)
django_1        | AttributeError: sources

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

4reactions
therefromherecommented, Dec 5, 2020

STRIPE_API_VERSION = '2020-03-02' in settings fixes it (note - not DEFAULT_STRIPE_API_VERSION)

1reaction
jleclanchecommented, Dec 5, 2020

from https://stripe.com/docs/upgrades#2020-08-27

“The sources property on Customers is no longer included by default. You can expand the list but for performance reasons we recommended against doing so unless needed.”

Sounds like the fix for now is to expand this, and in 2.5 we will get rid of its usage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Credit card failed payments in a Sandbox environment
This article explains why a test credit card fails in a Sandbox environment with PayPal APIs.
Read more >
Carding Attack · Issue #28614 · magento/magento2 - GitHub
Failure of the authorization due to 2FA still doesn't stop the authorization attempt, it just stops the fraud, and only for those cards...
Read more >
Credit card failed payments in a Sandbox environment
This article explains why a test credit card fails in a Sandbox environment with PayPal APIs. Affected products and versions. Adobe Commerce 2.4 ......
Read more >
21.6.2 Adjusting TIN-Related Problems - IRS
(11) IRM 21.6.2.4.1, added new caution to not input any merge transactions when multiple TC 960's are present on CC IMFOLQ, but elevate...
Read more >
Web Content Accessibility Guidelines (WCAG) 2.1 - W3C
2.4.1 Bypass Blocks; 2.4.2 Page Titled; 2.4.3 Focus Order ... WCAG 2.1 extends WCAG 2.0 by adding new success criteria, definitions to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found