Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Webgains transaction status #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lemonCMS
Copy link

@lemonCMS lemonCMS commented Oct 9, 2018

Update transaction status to be only confirmed when payment status is cleared (or payed?).

New transactions were getting confirmed right away while they are still within their cancellation period.

Update transaction status to be only confirmed when payment status is cleared (or payed?).

New transactions were getting confirmed right away while they are still within their cancellation period.
Copy link
Collaborator

@PaoloNardini PaoloNardini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we can't approve this change, as this break compatibility.
The function must return the original Webgains transactions status to the upper levels without any change. The caller, by reading both the 'status' and 'paid' values can decide whether to consider the transaction confirmed or pending. In our current use, we consider "confirmed" also a transactions without payment. Thank you.

@lemonCMS
Copy link
Author

The problem is, that payed represents if the lead is paid to the publisher. You don't receive the cleared status as you can see in the code en therefore i can never check if a lead is "cleared" without being payed to me, that is irrelevant. So line 252 should not change, but you need to consider paymentStatus: cleared for confirmed leads that are not paid yet.

@slawn
Copy link

slawn commented Oct 18, 2018

I agree with lemonCMS here - there needs to be some better way of achieving this. The original code was based only on the paymentStatus - and I think made more sense. I use around 12 networks and not a single one gives me status confirmed the next day after the purchase - and this one does. Usually confirmed means that it cannot be cancelled anymore - and in this case user can still return an item. Put it this way, once the transaction is confirmed it should never be able to change the status to declined (at least that is the case with other networks).

I fully understand if you do not agree and have your reasons to have it this way - but maybe you would be open to do this as an option that can be configured - I could leave your code by default and bring back the old method based on paymentStatus as an option?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants