Skip to content

Commit

Permalink
Ignore payments with invalid amounts. (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
facundobatista authored May 6, 2024
1 parent 37ca0da commit de9672c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ def process_mercadopago(self, results, filter_payment_id, filter_payer_id):
# needed information to record the payment
timestamp = parse_datetime(info['date_approved'])
amount = Decimal(info['transaction_amount'])
if amount <= 0:
logger.debug("Discarding invalid amount: %s", info)
continue

# some info to identify the payer in case it's not in our DB
id_helper = {
Expand Down

0 comments on commit de9672c

Please sign in to comment.