From 9f7f87a9a6a52f4113efc782b85f2b46ccee2c7b Mon Sep 17 00:00:00 2001 From: ethem Date: Thu, 31 Aug 2006 08:06:19 +0000 Subject: [PATCH] If the merchant does not accept ACH (echeck) method, set default payment method as AN_METHOD_CC. --- enrol/authorize/authorizenetlib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/enrol/authorize/authorizenetlib.php b/enrol/authorize/authorizenetlib.php index 054031a78e4..8a01a3a7ce6 100644 --- a/enrol/authorize/authorizenetlib.php +++ b/enrol/authorize/authorizenetlib.php @@ -384,7 +384,7 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE, $ if (!empty($cctype)) { $ccaccepts = enrolment_plugin_authorize::get_list_of_creditcards(); unset($ccaccepts[$cctype]); - set_config('an_acceptccs', array_keys($ccaccepts)); + set_config('an_acceptccs', implode(',', array_keys($ccaccepts))); enrolment_plugin_authorize::email_to_admin("Autoconfigure; This card type " . "isn't accepted: $cctype. New config:", $ccaccepts); } @@ -393,7 +393,9 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE, $ // Electronic checks aren't accepted case AN_REASON_NOACH: { - // Not implemented yet. + set_config('an_acceptmethods', AN_METHOD_CC); + enrolment_plugin_authorize::email_to_admin("Autoconfigure; ACH (Echeck) payment type " . + "isn't accepted: New config:", array(AN_METHOD_CC)); break; } // This echeck type isn't accepted