Skip to content

Commit

Permalink
Catch error for apple pay, google pay
Browse files Browse the repository at this point in the history
  • Loading branch information
adlindenberg committed Jun 19, 2021
1 parent 59e0dbf commit e83ad4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions djstripe/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ def _get_or_create_from_stripe_object(
# but still present during sync. For example, if a refund is
# issued on a charge whose payment method has been deleted.
return None, False
elif "A source must be attached to a customer to be used as a `payment_method`" in str(e):
# fix for single-use sources (apple pay, google pay)
return None, False
else:
raise
should_expand = False
Expand Down

0 comments on commit e83ad4a

Please sign in to comment.