Scope of constants in drupal I am connecting to a third party library to connect to authorize.net. In order to begin making any calls to the library, you must first define some constants, such as:


define("AUTHORIZENET_API_LOGIN_ID", "[LOGIN ID HERE]");
define("AUTHORIZENET_TRANSACTION_KEY", "[TRANSACTION KEY HERE]");


My issue is this: I have two separate Authorize.net accounts which need to be updated, both happening as the drupal user saves his account. Currently I have one custom submit handler added to the user_update_form form but I can't use this to make both calls. Should I be able to simply make a separate submit handler for each account, or will the constant be constant though both files?
This is more a PHP question than a Drupal one...

Global constants cannot be re-declared within the same request (well, short of using an extension: https://stackoverflow.com/questions/8465155/redefine-constants-in-php).

Since everything in Drupal 7 and below is in the global scope, you can't redeclare those variables within the same request. 

If it's hard-coded and causing you a problem, a patch to the module in question to allow contextually different API credentials would be the best thing to do IMO.