]> git.mjollnir.org Git - moodle.git/commitdiff
Allow all payment methods as default: AN_METHOD_CC, AN_METHOD_ECHECK
authorethem <ethem>
Mon, 4 Sep 2006 07:33:11 +0000 (07:33 +0000)
committerethem <ethem>
Mon, 4 Sep 2006 07:33:11 +0000 (07:33 +0000)
authorizenetlib.php autoconfigures payment method as AN_METHOD_CC if the merchant doesn't accept AN_METHOD_ECHECK. First real echeck transaction is enough for this.

enrol/authorize/localfuncs.php

index 4380a2fc65b74863b97f49aaa9c6f77e690869df..9cf1cb3e35e009d3cc11247e4dd378eb8400338c 100644 (file)
@@ -79,12 +79,9 @@ function get_list_of_payment_methods($getall = false)
 {
     global $CFG;
 
-    if ($getall) {
+    if ($getall || empty($CFG->an_acceptmethods)) {
         return array(AN_METHOD_CC, AN_METHOD_ECHECK);
     }
-    elseif (empty($CFG->an_acceptmethods)) {
-        return array(AN_METHOD_CC); // default
-    }
     else {
         return explode(',', $CFG->an_acceptmethods);
     }