Instant payments going from pending to denied #5

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@foutrelis

Hi!

I wanted to handle instant payments that go from pending to denied, and I noticed that they are currently flagged as duplicates. The attached commit makes it so they are not flagged, and I can now handle them through the payment_was_successful signal by checking if ipn_obj.payment_status == ST_PP_DENIED.

I'd be interested to know what you think about this issue and my change.

Cheers.

- # A payment that was pending and is now completed will have the same
- # IPN transaction id, so don't flag them as duplicates because it
- # means that the payment was finally successful!
+ if ipn_obj.payment_status in ("Completed", "Denied"):

This comment has been minimized.

Show comment Hide comment
@dominno

dominno Apr 3, 2011

It will better to use constants instead of strings - "Completed" "Denied". You will find all constants for payment statuses in https://github.com/dcramer/django-paypal/blob/master/paypal/standard/models.py

@dominno

dominno Apr 3, 2011

It will better to use constants instead of strings - "Completed" "Denied". You will find all constants for payment statuses in https://github.com/dcramer/django-paypal/blob/master/paypal/standard/models.py

@spookylukey

This comment has been minimized.

Show comment Hide comment
@spookylukey

spookylukey Jan 3, 2014

Collaborator

I think this has already been fixed, with a different approach.

Collaborator

spookylukey commented Jan 3, 2014

I think this has already been fixed, with a different approach.

@spookylukey spookylukey closed this Jan 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment