]> git.mjollnir.org Git - moodle.git/commitdiff
If the merchant does not accept ACH (echeck) method, set default payment method as...
authorethem <ethem>
Thu, 31 Aug 2006 08:06:19 +0000 (08:06 +0000)
committerethem <ethem>
Thu, 31 Aug 2006 08:06:19 +0000 (08:06 +0000)
enrol/authorize/authorizenetlib.php

index 054031a78e43358968cd6a722972bc40250050c3..8a01a3a7ce6413c09c361e0a5239ab4fbea6d867 100644 (file)
@@ -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