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

Commit

Permalink
fix: WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
julianajlk committed Apr 8, 2024
1 parent d652075 commit dec3d21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ecommerce/extensions/payment/processors/webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ def handle_webhooks_payment(self, request, payment_intent, payment_method_type):
properties.update({'success': False, 'payment_error': type(ex).__name__, })
raise
else:
# Card number and card type is required for Source object, it cannot be null (payment_source.label)
# Card number is required for Source object, it cannot be null (payment_source.label)
# Dynamic payment methods payment intents do not contain any card information, adding the DPM type instead.
label = 'Stripe {}'.format(payment_method_type)
handled_processor_response = HandledProcessorResponse(
transaction_id=payment_intent_id,
total=total,
currency=currency,
card_number=payment_method_type,
card_type=payment_method_type
card_number=label,
card_type=None
)
self.record_payment(basket, handled_processor_response)
properties.update({'total': handled_processor_response.total, 'success': True, })
Expand Down

0 comments on commit dec3d21

Please sign in to comment.