Skip to content

Instantly share code, notes, and snippets.

@gbozee
Created October 23, 2018 05:15
Show Gist options
  • Save gbozee/56612c6756b6f7f63df1652dbe22bc06 to your computer and use it in GitHub Desktop.
Save gbozee/56612c6756b6f7f63df1652dbe22bc06 to your computer and use it in GitHub Desktop.
@receiver(p_signals.payment_verified)
def on_payment_verified(sender, ref, amount, order, **kwargs):
record = UserPayment.objects.filter(order=order).first()
record.made_payment = True
record.amount = Decimal(amount) / 100
record.save()
# process to quickbooks
record.create_sales_receipt()
record.add_to_mailing_list()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment