adixon / ca.civicrm.iats

[deprecated] CiviCRM Extension for IATS Web Services Payment Processor
3 stars 0 forks source link

Request: Don't filter test contributions in recurring contributions job #16

Open lolaslade opened 10 years ago

lolaslade commented 10 years ago

In the function civicrm_api3_job_iatsrecurringcontributions a SQL query is built to look for eligible recurring contributions. This query contains the clause "AND pp.is_test = 0". Unless this is strictly necessary I would prefer that this not be used as a filter so that round trip testing can be done using the test credentials.

adixon commented 10 years ago

Okay .. I guess that you already know that you can do round-trip testing with the test credentials by putting those test credentials into the production values.

I think I probably need to also follow the logic all the way through to make sure that this change doesn't start creating test entries marked as real ones. Have you tested this out already?

lolaslade commented 10 years ago

Sometimes a customer has both test pages and live pages on the same site using the payment processor. In this situation we don't want to put the test credentials in the live credentials settings. In this case the client was testing recurring contributions themselves from their site using test pages.

Yes, I've tried it by commenting out the clause. Unfortunately it does create test contributions marked as real ones. This is part of the whole problem where the properties of the parent recurring contribution are not copied to the recurrences. This problem is not unique to IATS. It also happens in the core Paypal IPN processors.

I would be fine with having this documented as a known issue. If someone is testing they usually use an obvious test contact and can delete the whole contact afterwards.

adixon commented 10 years ago

Okay, this is helpful. Since we're manually creating the children contributions ourselves, we should be able to check the test-or-not status of the parent and make the children test contributions as well where necessary. Always good to be better than paypal ...

adixon commented 10 years ago

This is now in as the latest commit over on the official home of this extension, here: https://github.com/iATSPayments/com.iatspayments.civicrm/commit/eb8b93c6c0f27906e065fd6d944046f1ac443322

The patch should apply cleanly to the most recent updates of this version as well.