Authorize.net

Enrolment ::: enrol_authorizedotnet
Maintained by DualCube Team
Enrolment in Moodle using Authorize.net payment gateway for paid courses This plugin helps admins and webmasters use Authorize.net as the payment gateway. Authorze.net is one of the most commonly used payment gateways and offers considerable number of features unsupported by other payment gateways like Paypal. This plugin has all the settings for development as well as for production usage. Its easy to install, set up and effective.
Latest release:
179 sites
70 downloads
34 fans
Current versions available: 1

Enrolment in Moodle using Authorize.net payment gateway for paid courses


This plugin helps admins and webmasters use Authorize.net as the payment gateway. PAuthorze.net is one of the most commonly used payment gateways and offers considerable number of features unsupported by other payment gateways like Paypal. This plugin has all the settings for development as well as for production usage. Its easy to install, set up and effective.


Installation Guidence :


Login to your moodle site as an “admin user” and follow the steps.


1) Upload the zip package from Site administration > Plugins > Install plugins. Choose Plugin type 'Enrolment method (enrol)'. Upload the ZIP package, check the acknowledgement and install.


2) Go to Enrolments > Manage enrol plugins > Enable 'Authorize.net' from list


3) Click 'Settings' which will lead to the settings page of the plugin


4) Provide merchant credentials for Authorize.net, select the checkbox as per requirement. Save the settings.


5) Select any course from course listing page.


6) Go to Course administration > Users > Enrolment methods > Add method 'Authorize.net' from the dropdown. Set 'Custom instance name', 'Enrol cost' etc and add the method.


This completes all the steps from the administrator end. Now registered users can login to the Moodle site and view the course after a successful payment.



Note: You need to configure the Default Relay Response URL in you authorized.net account. The Relay Response URL will be "http://your_moodle_website/enrol/authorizedotnet/ipn.php"


To add a Default Relay Response URL:


Log into the Merchant Interface at https://account.authorize.net/ or Sandbox Interface https://sandbox.authorize.net/.

Click Account from the main toolbar.

Click Response/Receipt URLs under Transaction Format Settings.

Click Edit next to Default Relay Response URL. The Relay Response page appears.

In the URL text field, enter the URL where the payment gateway should send the transaction response. This URL must start with either "http://" or "https://". Parameterized URLs are not permitted.

Click Submit. A confirmation message indicates that the URL has been added.



To add a URL to the list of authorized Response or Receipt URLs:


Log into the Merchant Interface at https://account.authorize.net/ or Sandbox Interface https://sandbox.authorize.net/.

Click Account from the main toolbar.

Click Response/Receipt URLs under Transaction Format Settings.

Click Add URL.

Enter the new URL. This URL must start with either "http://" or "https://".

Click Submit.



Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3

Contributors

DualCube Team (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Tue, Aug 25, 2020, 11:23 PM
    I am seeing the same error as Evan Erickson - referencing line 237 of update.php, undefined variable: plugin. This is using Moodle 3.5 and the 2020072400 build of the Authorize.net plugin.

    I do not know if this has any bearing, but I noticed that the latest plugin does not have the ipn.php file anymore, yet the instructions still indicate to use this file as the relay response URL.

    Any help would be appreciated.

    Thanks.
  • Fri, Aug 28, 2020, 8:47 PM
    I have gathered additional information from the Apache error log (using WAMP setup). When a user tries to enroll in a course using Authorize.Net, the lines shown below are captured in the error.log file (Note that I have changed client and site information in the errors below; also note that our site is not directly in htdocs, but in a folder under htdocs).

    Again, any help would be appreciated. Thanks.

    From Apache error.log file:

    [Fri Aug 28 08:28:53.287656 2020] [:error] [pid 106900:tid 856] [client NNN] Debugging: Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result in \r\n* line 493 of \\lib\\pagelib.php: call to debugging()\n* line 1544 of \\lib\\pagelib.php: call to moodle_page->magic_get_context()\n* line 1934 of \\lib\\setuplib.php: call to moodle_page->initialise_theme_and_output()\n* line 49 of \\enrol\\authorizedotnet\\pay_process.php: call to bootstrap_renderer->__call()\n, referer: https://SITENAME/enrol/index.php?id=74
    [Fri Aug 28 08:28:53.505668 2020] [:error] [pid 106900:tid 856] [client NNN] PHP Warning: SimpleXMLElement::__construct(): namespace warning : xmlns: URI AnetApi/xml/v1/schema/AnetApiSchema.xsd is not absolute in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\pay_process.php on line 72, referer: https://SITENAME/enrol/index.php?id=74
    [Fri Aug 28 08:28:53.512669 2020] [:error] [pid 106900:tid 856] [client NNN] PHP Warning: SimpleXMLElement::__construct(): <createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\pay_process.php on line 72, referer: https://SITENAME/enrol/index.php?id=74
    [Fri Aug 28 08:28:53.512669 2020] [:error] [pid 106900:tid 856] [client NNN] PHP Warning: SimpleXMLElement::__construct(): ^ in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\pay_process.php on line 72, referer: https://SITENAME/enrol/index.php?id=74
    [Fri Aug 28 08:28:53.518669 2020] [:error] [pid 106900:tid 856] [client NNN] PHP Warning: curl_setopt(): CURLOPT_DNS_USE_GLOBAL_CACHE cannot be activated when thread safety is enabled in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\pay_process.php on line 115, referer: https://SITENAME/enrol/index.php?id=74
    [Fri Aug 28 08:28:53.783684 2020] [:error] [pid 106900:tid 856] [client NNN] PHP Notice: Undefined property: stdClass::$authCode in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\pay_process.php on line 128, referer: https://SITENAME/enrol/index.php?id=74
    [Fri Aug 28 08:28:53.783684 2020] [:error] [pid 106900:tid 856] [client NNN] PHP Notice: Undefined property: stdClass::$responseCode in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\pay_process.php on line 129, referer: https://SITENAME/enrol/index.php?id=74
    [Fri Aug 28 08:28:53.783684 2020] [:error] [pid 106900:tid 856] [client NNN] PHP Notice: Undefined property: stdClass::$transId in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\pay_process.php on line 130, referer: https://SITENAME/enrol/index.php?id=74
    [Fri Aug 28 08:28:54.125704 2020] [:error] [pid 106900:tid 856] [client NNN] PHP Notice: Undefined variable: plugin in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\update.php on line 237, referer: https://SITENAME/enrol/authorizedotnet/pay_process.php
    [Fri Aug 28 08:28:54.126704 2020] [:error] [pid 106900:tid 856] [client NNN] Default exception handler: Exception - Call to a member function enrol_user() on null Debug: \r\nError code: generalexceptionmessage\n* line 237 of \\enrol\\authorizedotnet\\update.php: Error thrown\n, referer: https://SITENAME/enrol/authorizedotnet/pay_process.php
  • Tue, Sep 1, 2020, 8:16 PM
    Thanks Corey,
    We are working to debug the issue.
    Thank you.
  • Tue, Sep 1, 2020, 9:46 PM
    DualCube - Thank you for looking into this issue.

    Note that I did change the URL from the test URL to production (in pay_process.php file) and tried again. Some of the errors are the same, but some are different. Below is what is in the apache error log now with an attempted transaction:


    [Tue Sep 01 09:35:29.209973 2020] [:error] [pid 96840:tid 872] [client NNNN:65163] Debugging: Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result in \r\n* line 493 of \\lib\\pagelib.php: call to debugging()\n* line 1544 of \\lib\\pagelib.php: call to moodle_page->magic_get_context()\n* line 1934 of \\lib\\setuplib.php: call to moodle_page->initialise_theme_and_output()\n* line 49 of \\enrol\\authorizedotnet\\pay_process.php: call to bootstrap_renderer->__call()\n, referer: https://SITENAME/enrol/index.php?id=74
    [Tue Sep 01 09:35:29.436986 2020] [:error] [pid 96840:tid 872] [client NNNN:65163] PHP Warning: SimpleXMLElement::__construct(): namespace warning : xmlns: URI AnetApi/xml/v1/schema/AnetApiSchema.xsd is not absolute in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\pay_process.php on line 72, referer: https://SITENAME/enrol/index.php?id=74
    [Tue Sep 01 09:35:29.444986 2020] [:error] [pid 96840:tid 872] [client NNNN:65163] PHP Warning: SimpleXMLElement::__construct(): <createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\pay_process.php on line 72, referer: https://SITENAME/enrol/index.php?id=74
    [Tue Sep 01 09:35:29.444986 2020] [:error] [pid 96840:tid 872] [client NNNN:65163] PHP Warning: SimpleXMLElement::__construct(): ^ in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\pay_process.php on line 72, referer: https://SITENAME/enrol/index.php?id=74
    [Tue Sep 01 09:35:31.344095 2020] [:error] [pid 96840:tid 872] [client NNNN:65163] PHP Warning: mysqli::real_escape_string() expects parameter 1 to be string, array given in C:\\Apache24\\htdocs\\SITEFOLDER\\lib\\dml\\mysqli_native_moodle_database.php on line 1112, referer: https://SITENAME/enrol/authorizedotnet/pay_process.php
    [Tue Sep 01 09:35:31.347095 2020] [:error] [pid 96840:tid 872] [client NNNN:65163] PHP Notice: Undefined variable: plugin in C:\\Apache24\\htdocs\\SITEFOLDER\\enrol\\authorizedotnet\\update.php on line 237, referer: https://SITENAME/enrol/authorizedotnet/pay_process.php
    [Tue Sep 01 09:35:31.348095 2020] [:error] [pid 96840:tid 872] [client NNNN:65163] Default exception handler: Exception - Call to a member function enrol_user() on null Debug: \r\nError code: generalexceptionmessage\n* line 237 of \\enrol\\authorizedotnet\\update.php: Error thrown\n, referer: https://SITENAME/enrol/authorizedotnet/pay_process.php
  • Fri, Oct 2, 2020, 4:42 AM
    Have these issues been resolved yet? Just curious is anyone is having any luck using this plugin since I'm still getting the same errors as I mentioned above...
  • Tue, Oct 6, 2020, 9:07 PM
    Evan - I have heard nothing more. We ended up going back to previous version for now, since it works.
  • Thu, Oct 8, 2020, 12:14 PM
    Dear Corey,
    We are still trying to fix it but yes, the previous version still works for many installations. Thank you.
  • Sat, Dec 5, 2020, 7:58 AM
    Which is the previous version?
  • Mon, Jan 4, 2021, 8:53 PM
    Has anyone been able to get this plugin to work on Moodle 3.9? I tried for weeks (if not months) to get this plugin to work for our Moodle-site Moodle 3.8.3+ (Build: 20200605) but the Developers of this plugin were never able to get it to work or be supported for our Moodle-site (kinda blows my mind)... we're updating to 3.9 in the coming weeks and hopefully this is working now? Thanks!
  • Thu, Feb 4, 2021, 7:24 AM
    This is causing us problems on moodle versions 3.8, 3.9, and 3.10. We have it working in moodle 3.7. It looks like changes were made after this version, it no longer asks for the name or address of the purchaser.

    We've captured some logs from two different versions of the plugin, I hope it helps.
    #####################
    moodle version 3.10 -
    authorize.net plugin
    2.5 (Build: 20150610)
    2019020401

    results: after copying missing files lib/eventslib.php - PHP Fatal error: Cannot redeclare events_get_cached() (previously declared in /var/www/moodle/lib/deprecatedlib.php:2648) in /var/www/moodle/lib/eventslib.php on line 38

    #####################
    moodle version 3.10 –
    authorize.net plugin
    2.5 (Build: 20150610)
    2020072400

    results (plain setup nothing special):

    BROWSER DEBUG STACK:
    Exception - Call to a member function enrol_user() on null
    Debug info:
    Error code: generalexceptionmessage
    Stack trace:
    • line 237 of /enrol/authorizedotnet/update.php: Error thrown
    Output buffer:
    Notice: Undefined variable: plugin in /var/www/moodle/enrol/authorizedotnet/update.php on line 237

    From Apache2 error_log:
    [Wed Feb 03 13:31:23.252419 2021] [php7:notice] [pid 310329] [client 10.155.250.143:6979] Debugging: Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result in \n* line 503 of /lib/pagelib.php: call to debugging()\n* line 1543 of /lib/pagelib.php: call to moodle_page->magic_get_context()\n* line 1949 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()\n* line 49 of /enrol/authorizedotnet/pay_process.php: call to bootstrap_renderer->__call()\n, referer:
    [Wed Feb 03 13:31:23.395083 2021] [php7:warn] [pid 310329] [client 10.155.250.143:6979] PHP Warning: SimpleXMLElement::__construct(): namespace warning : xmlns: URI AnetApi/xml/v1/schema/AnetApiSchema.xsd is not absolute in /var/www/moodle/enrol/authorizedotnet/pay_process.php on line 72, referer:
    [Wed Feb 03 13:31:23.395166 2021] [php7:warn] [pid 310329] [client 10.155.250.143:6979] PHP Warning: SimpleXMLElement::__construct(): <createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> in /var/www/moodle/enrol/authorizedotnet/pay_process.php on line 72, referer:
    [Wed Feb 03 13:31:23.395208 2021] [php7:warn] [pid 310329] [client 10.155.250.143:6979] PHP Warning: SimpleXMLElement::__construct(): ^ in /var/www/moodle/enrol/authorizedotnet/pay_process.php on line 72, referer:
    [Wed Feb 03 13:31:23.595718 2021] [php7:notice] [pid 310329] [client 10.155.250.143:6979] PHP Notice: Undefined property: stdClass::$authCode in /var/www/moodle/enrol/authorizedotnet/pay_process.php on line 128, referer:
    [Wed Feb 03 13:31:23.595807 2021] [php7:notice] [pid 310329] [client 10.155.250.143:6979] PHP Notice: Undefined property: stdClass::$responseCode in /var/www/moodle/enrol/authorizedotnet/pay_process.php on line 129, referer:
    [Wed Feb 03 13:31:23.595854 2021] [php7:notice] [pid 310329] [client 10.155.250.143:6979] PHP Notice: Undefined property: stdClass::$transId in /var/www/moodle/enrol/authorizedotnet/pay_process.php on line 130, referer:
    [Wed Feb 03 13:31:24.169886 2021] [php7:notice] [pid 310329] [client 10.155.250.143:6979] PHP Notice: Undefined variable: plugin in /var/www/moodle/enrol/authorizedotnet/update.php on line 237, referer:
    [Wed Feb 03 13:31:24.173920 2021] [php7:notice] [pid 310329] [client 10.155.250.143:6979] Default exception handler: Exception - Call to a member function enrol_user() on null Debug: \nError code: generalexceptionmessage\n* line 237 of /enrol/authorizedotnet/update.php: Error thrown\n, referer:
  • Fri, Feb 12, 2021, 9:12 PM
    Anyone having luck with this plugin, seems like the Developers no longer maintain this???
  • Wed, Mar 17, 2021, 1:36 AM
    User authentication failed due to invalid authentication values.
    I replaced in pay_process.php to production link which is api.authorize.net/xml/v1/request.api
    and i have new transaction key and API login ID and public key and i reset these 2 times till now, and i still getting this error User authentication failed due to invalid authentication values. is there any solution please.
  • Tue, May 4, 2021, 1:32 PM
  • Fri, Jun 4, 2021, 1:59 PM
    IMBMS (Indian Medical Business Management System) is one of the leading active retail suppliers in the market today. Outstanding assortment and distribution of premium grade personal care products have made us one of the most trusted names in the market. From skin whitening products to fairness cosmetic and night creams, we deal in almost every variety of personal care beauty products that will make you look younger for longer.

    nice post
    IMBMS (Indian Medical Business Management System) is one of the leading active retail suppliers in the market today. Outstanding assortment and distribution of premium grade personal care products have made us one of the most trusted names in the market. From skin whitening products to fairness cosmetic and night creams, we deal in almost every variety of personal care beauty products that will make you look younger for longer.
    Glutax 5gs micro advance
1 2 3 4 5 6 7 8
Please login to post comments