Jump to content

If TESTINSTALL, don't take renewal payments automatically


Recommended Posts

Why on earth does the software send renewal invoices from a backup installation? Isn't that just asking for trouble?

Even if an admin knows to set NEXUS_TEST_GATEWAYS to TRUE in constants.php, they shouldn't really have to, should they?

Even if they do, it doesn't seem to work. Here's the content of my constants.php file:

<?php

define('USE_DEVELOPMENT_BUILDS', TRUE );
define( 'COOKIE_PREFIX', 'eab_' );
define( 'NEXUS_TEST_GATEWAYS', true );
define( 'EMAIL_DEBUG_PATH', "/dev/null");

Here's the date that I created it:

OnPaste.20210702-111535.png.c09a249f4405012d19c40329d487f771.png

And yet look what's happening in my ACP:

OnPaste.20210702-112354.png.08903b4e597913cc4f49a9d39edd31f6.png

1) What is going on here? Why is my backup site sending renewal invoices when I've expressly set it not to via constants.php?

2) Why should I even have to do that anyway? It's not an obvious thing to do when you're creating a backup for testing purposes or prior to upgrade. If the TESTINSTALL licence key is used, then why isn't this functionality automatically disabled, with perhaps an option to activate it in the ACP?

Link to comment
Share on other sites

Refining my thinking/complaint, now that I've thought about it. It's not sending out the invoices because otherwise we'd have heard from some of the several people, and we wouldn't have so many people people not having paid. Come to think of it, the gentleman who informed me yesterday didn't mention anything about having received an invoice: he said that a payment had been erroneously taken from his account.

So it seems to be the system is correctly obeying the instruction not to send emails. (define( 'EMAIL_DEBUG_PATH', "/dev/null"); in constants.php.) What's gone wrong seems to be that it's processing the payments for people whose cards are on record.

So I should refine my wording a little bit, having just sent in a ticket about the problem.

Why would a test installation need to take payments or send emails, other than for testing purposes? We're all encouraged to backup our databases prior to upgrade, and to test in advance. That's why we all have the option of a TESTINSTALL licence. Why isn't it the case that if the installation is a test one, sending invoices and taking money isn't disabled by default, with perhaps an option to opt into it for testing purposes, much as one can enter Designers' Mode?

Link to comment
Share on other sites

When using the 'NEXUS_TEST_GATEWAYS' constant TRUE or FALSE, why couldn't the commerce code be modified to switch between communicating with a payment processor or creating an entry in a Test Payment Logs file viewable in the Support Section of the ACP that a transaction was initiated? 

image.png.11d44708fc11ddd8fc32c731b3e24519.pngThis way you could test the software suite with live data without the risk of double charging any customer.

Edited by Chris Anderson
Link to comment
Share on other sites

44 minutes ago, Chris Anderson said:

When using the 'NEXUS_TEST_GATEWAYS' constant TRUE or FALSE, why couldn't the commerce code be modified to switch between communicating with a payment processor or creating an entry in a Test Payment Logs file viewable in the Support Section of the ACP that a transaction was initiated? 

image.png.11d44708fc11ddd8fc32c731b3e24519.pngThis way you could test the software suite with live data without the risk of double charging any customer.

There are many legitimate reasons why you would still want the payments to go to the gateway when using test gateways. A big one is that we wouldn't be able to test issues customers reports or work on bug fixes/features with out it, it is extensively used through our development process and by customers who provide development and support to other users of Commerce.

The thing is, the constant will change most gateways to send data to their sandbox/test environments instead of their live environment but Stripe does not work in the same way. Stripe relies on the API Key provided to determine if the data is for a live transaction or a test transaction. If you're using a live API key on your test site then Stripe is going to interpret the data as live data.

TLDR, Generate a test api key and use that on your test site instead.

Link to comment
Share on other sites

15 minutes ago, Stuart Silvester said:

There are many legitimate reasons why you would still want the payments to go to the gateway when using test gateways.

Fine, but why not allow one to opt into that functionality on a test installation? If you need to do this testing, you're likely to be more familiar with development and the IC platform than generic users such as me are. We, not knowing any better, are the individuals who will think we're being responsible in creating a test environment before upgrading, etc, in total ignorance that we should've made changes to constants.php. (This doesn't solve the particular issue with Stripe, I know.)

(Is a solution simply to remove the payment gateways in the test environment or will Stripe continue to bill anyway?)

Link to comment
Share on other sites

I was totally unaware of the additional available constants that @Meddysongmentioned above as they are not listed in the constants.php Help Guide.

@Stuart SilvesterThere may be value in creating an detailed Help Guide for setting up and utilizing test sites effectively.  Especially considering you rely a great deal on your customers for testing each of your releases, and having fewer support requests benefits everyone.  This could be a collaborative effort between your company and your most knowledgeable customers.

Being an effective tester requires an entirely different mindset and knowledge base than being a community manager.  That is something you have experience with, why not share your knowledge in an easily digestible fashion.  

 

Link to comment
Share on other sites

21 minutes ago, Chris Anderson said:

I was totally unaware of the additional available constants that @Meddysongmentioned above as they are not listed in the constants.php Help Guide.

@Stuart SilvesterThere may be value in creating an detailed Help Guide for setting up and utilizing test sites effectively.  Especially considering you rely a great deal on your customers for testing each of your releases, and having fewer support requests benefits everyone.  This could be a collaborative effort between your company and your most knowledgeable customers.

Being an effective tester requires an entirely different mindset and knowledge base than being a community manager.  That is something you have experience with, why not share your knowledge in an easily digestible fashion.  

 

Added to the list for future guides.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...