Commits

Luke Plant committed 17f1a60

Handle flagged paypal payments

  • Participants
  • Parent commits 6b9f0b1
  • Branches bookings

Comments (0)

Files changed (2)

File cciw/bookings/hooks.py

 import re
 
-from paypal.standard.ipn.signals import payment_was_successful
+from paypal.standard.ipn.signals import payment_was_successful, payment_was_flagged
 
 from .signals import places_confirmed
 from .email import send_unrecognised_payment_email, send_places_confirmed_email
 
 ### Payments ####
 
-def unrecognised_payment(ipn_obj):
+def unrecognised_payment(ipn_obj, **kwargs):
     send_unrecognised_payment_email(ipn_obj)
 
 
 #### Wiring ####
 
 payment_was_successful.connect(paypal_payment_received)
+payment_was_flagged.connect(unrecognised_payment)
 places_confirmed.connect(places_confirmed_handler)

File templates/cciw/bookings/unrecognised_payment_email.txt

 {% load url from future %}{% autoescape off %}
-An unrecognised payment was received from Paypal. Please
+An unrecognised or flagged payment was received from Paypal. Please
 check it at:
 
 {{ url_start }}{% url 'admin:ipn_paypalipn_change' ipn_obj.id %}