Skip to content

Commit

Permalink
chore: fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
salman2013 committed Jan 15, 2024
1 parent fc3d8a8 commit da6fc8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ecommerce/extensions/payment/processors/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def handle_processor_response(self, response, basket=None):
raise

# proceed only if payment went through
# pylint: disable=E1136
assert confirm_api_response['status'] == "succeeded"
self.record_processor_response(confirm_api_response, transaction_id=payment_intent_id, basket=basket)

Expand All @@ -197,6 +198,7 @@ def handle_processor_response(self, response, basket=None):

total = basket.total_incl_tax
currency = basket.currency
# pylint: disable=E1136
card_object = confirm_api_response['charges']['data'][0]['payment_method_details']['card']
card_number = card_object['last4']
card_type = STRIPE_CARD_TYPE_MAP.get(card_object['brand'])
Expand Down

0 comments on commit da6fc8c

Please sign in to comment.