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

Do not process orders automatically #272

Merged
merged 3 commits into from
Jun 5, 2017
Merged

Do not process orders automatically #272

merged 3 commits into from
Jun 5, 2017

Conversation

bor0
Copy link
Member

@bor0 bor0 commented Jun 1, 2017

Fixes #260.

@gedex
Copy link
Member

gedex commented Jun 1, 2017

AFAIK, if payment action is set to Authorize, you won't get pinged via PP IPN. The order status is updated by IPN handler, so I think it should remains in on-hold.

@gedex
Copy link
Member

gedex commented Jun 1, 2017

Ok, i just tested this with master and apparently it updates the status :/. Testing your branch.

@gedex
Copy link
Member

gedex commented Jun 1, 2017

@bor0 I think the culprit of this is sandbox check on IPN handler. PayPal standard in core has the same check. This won't affect live transaction. I'm not sure the reasoning behind that. @mikejolley did you remember why we need to set payment status to completed (in IPN handler) when sandbox is enabled?

The change introduced in this PR will affect transaction when payment action is set to Sale (authorize and capture). So, i suggest we either remove the sandbox check or add another check based on payment action setting.

@yukikatayama @mdmoore does the issue happens on live mode? I imagine if that's the case it will generate lots of tickets.

@mikejolley
Copy link
Member

@gedex A longstanding issue in PayPal IPN was that it was not possible to get 'completed' status back - only pending. So to work around this and test payments for real we added the test_ipn check to workaround it.

It only affects sandbox and should not affect live. It would be better to not work around it in other places and just accept that in testing with Sandbox, all transactions are completed.

@bor0
Copy link
Member Author

bor0 commented Jun 1, 2017

Thanks for confirming @mikejolley!

Waiting for @yukikatayama / @mdmoore to confirm that it only happens on sandbox before closing it as wont fix.

@mikejolley
Copy link
Member

mikejolley commented Jun 1, 2017

@gedex @bor0 Or we could change the core code to only flip that status if not using authorisations?

Would need some extra testing though - don't want to break things :) And captures may not work in sandbox.

@bor0
Copy link
Member Author

bor0 commented Jun 1, 2017

It would have to be both core change (for PayPal) and change in this extension (PPEC), right? Or did you mean changing some other part?

@mikejolley
Copy link
Member

@bor0 Just the core test_ipn check

@bor0
Copy link
Member Author

bor0 commented Jun 1, 2017

@mikejolley but we have that check both in
Extension
and
Core

So just confirming it needs both changes on the extension and core?

@mikejolley
Copy link
Member

Ah yes. I didn't realise PPEC had IPN too.

@yukikatayama
Copy link

Update from @mdmoore and my testings - in Live mode, the correct behavior of going to on-hold is working! :) However when changing status to processing/complete, transaction is not made. Details here.

@bor0
Copy link
Member Author

bor0 commented Jun 5, 2017

@gedex / @mikejolley another round of review please? (Along with woocommerce/woocommerce#15402)

@bor0 bor0 merged commit 8846c6d into master Jun 5, 2017
@bor0 bor0 deleted the fix/issue-260 branch June 5, 2017 12:34
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.

4 participants