Skip to content

Commit

Permalink
feat: log HandledProcessorResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
igobranco committed Apr 19, 2024
1 parent 275530f commit cdd1e0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions paygate/management/commands/retry_baskets_payed_in_paygate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
class Command(BaseCommand):
"""
Command that retries to receive the missing server callbacks from PayGate.
Example to retry last 24 hours:
python manage.py retry_baskets_payed_in_paygate --delta_in_minutes=1440
"""

help = """retries to receive the missing server callbacks from PayGate."""
Expand Down
6 changes: 4 additions & 2 deletions paygate/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def handle_processor_response(self, response, basket=None):
basic_auth_pass=self.api_basic_auth_pass,
)
logger.info(
"Search Transactions on PayGate received the response data: [%s]",
"Search Transactions on PayGate received the response data: %s",
search_response_data,
)
confirmed_payed_on_paygate = False
Expand Down Expand Up @@ -505,13 +505,15 @@ def handle_processor_response(self, response, basket=None):
# Save only a mask of the card
card_number = paygate_transaction.get("CARD_MASKED_PAN", card_type)

return HandledProcessorResponse(
hpr = HandledProcessorResponse(
transaction_id=transaction_id,
total=total,
currency=currency,
card_number=card_number,
card_type=card_type,
)
logger.info("HandledProcessorResponse is %s", hpr)
return hpr

def issue_credit(
self, order_number, basket, reference_number, amount, currency
Expand Down

0 comments on commit cdd1e0a

Please sign in to comment.