Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix: Add status of the payment intent to log
Browse files Browse the repository at this point in the history
  • Loading branch information
julianajlk committed May 8, 2024
1 parent 61c055c commit f772cb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions ecommerce/extensions/payment/processors/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,12 @@ def handle_processor_response(self, response, basket=None):

logger.info(
'Confirmed Stripe payment intent [%s] for basket [%d] and order number [%s], '
'with dynamic_payment_methods_enabled [%s].',
'with dynamic_payment_methods_enabled [%s] and status [%s].',
payment_intent_id,
basket.id,
basket.order_number,
dynamic_payment_methods_enabled
dynamic_payment_methods_enabled,
confirm_api_response['status']
)

# If the payment has another status other than 'succeeded', we want to return to the MFE something it can handle
Expand Down
5 changes: 3 additions & 2 deletions ecommerce/extensions/payment/tests/views/test_stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,11 +552,12 @@ def test_payment_handle_payment_intent_in_progress(self):
expected_log = (
'INFO:ecommerce.extensions.payment.processors.stripe:'
'Confirmed Stripe payment intent [{}] for basket [{}] and order number [{}], '
'with dynamic_payment_methods_enabled [{}].'.format(
'with dynamic_payment_methods_enabled [{}] and status [{}].'.format(
payment_intent_id,
basket.id,
basket.order_number,
dynamic_payment_methods_enabled
dynamic_payment_methods_enabled,
response.json()['status']
)
)
actual_log = log.output[6]
Expand Down

0 comments on commit f772cb7

Please sign in to comment.