def save_payment_events(self, order):
        if not self._payment_events:
            return
        for event in self._payment_events:
            event.order = order
            event.save()
        # We assume all lines are involved in the initial payment event
        for line in order.lines.all():
            PaymentEventQuantity.objects.create(
                event=event, line=line, quantity=line.quantity)
Saves any relevant payment events for this order
dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/apps/checkout/mixins.py/OrderPlacementMixin.save_payment_events