Skip to content

Commit

Permalink
Fix : payment rollback issue on fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyansh61 committed Apr 24, 2024
1 parent 5e5f6bf commit b2cff48
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/tickets/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def post(self, request, *args, **kwargs):
order.save()
return Response(response_data, status=status.HTTP_200_OK)
else:
transaction.set_rollback(True)
return Response({"error": "Failed to create UPI gateway", "data": response_data}, status=status.HTTP_400_BAD_REQUEST)

def create_upi_data(account, txn_id, amount, phone_number, order_id):
Expand Down

0 comments on commit b2cff48

Please sign in to comment.