## Enrolment: Authorize.net

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.
132 sites
19 fans

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 :

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:

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:

Click Account from the main toolbar.

Click Response/Receipt URLs under Transaction Format Settings.

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

Click Submit.

### Awards

• Tue, 18 Apr 2017, 8:12 PM
@William,

Then set up and test it using your sandbox account.

Kindly let me know the output.

Thanks and Regards,
Arindam
• Wed, 19 Apr 2017, 1:52 AM
Is this what you needed?
Coding error detected, it must be fixed by a programmer: Invalid property courseid specified

×Debug info:
Error code: codingerror
×Stack trace:
line 215 of /lib/classes/message/message.php: coding_exception thrown
line 125 of /enrol/authorizedotnet/update.php: call to core\message\message->__set()
• Wed, 19 Apr 2017, 2:06 AM
I figured out the issue!
in the file listed above..(line 125 of /enrol/authorizedotnet/update.php: call to core\message\message->__set()) is a change from moodle 3.1.
but essentially, change
$eventdata = new \core\message\message();$eventdata->courseid = SITEID;

to

\$eventdata = new stdClass();

if you are using moodle version 3.1

Thanks for the plugin!
• Thu, 20 Apr 2017, 5:18 PM
Hi William,

Thanks and Regards,
Arindam
• Thu, 22 Jun 2017, 10:46 PM
Recent Moodle upgrade and now I am seeing this error on a test run:

Looks like the bug above and so tells me this is still in your distribution code. Using:

M 2.7.20
Authorize.net enrol_authorizedotnet Additional 2015061502 2.5 (Build: 20150610)

Going to try the above fix...
• Thu, 22 Jun 2017, 11:07 PM
Well, I'm not sure what the message code / API should be for M 2.7 but I turned notify students off, and it started to process again. I still need some help here, where can I look at the old releases ? Thanks
• Tue, 27 Jun 2017, 3:14 PM
Hi John,

• Tue, 19 Sep 2017, 9:14 PM
It is being a long time that i have found this one also here i am lucky to have this also thanks, i think you should look at https://www.webhostingonedollar.com. thanks for sharing this lovely one also.
• Wed, 20 Sep 2017, 7:34 PM
Hi Andrea,

Thanks and Regards,
Arindam
• Tue, 14 Nov 2017, 1:29 PM
• Wed, 15 Nov 2017, 4:49 AM
I just want a payment option that will give access to EVERY course on my Moodle site, will this plugin do that?
ie: The plugin takes payment when the user creates their moodle account and the user then can browse and access
all courses's without hindrance?
• Thu, 16 Nov 2017, 8:37 PM
Hi! Ken,
Unfortunately, this plugin does not serve this facility. You can set up the price for each of courses in your site by this plugin.
• Mon, 20 Nov 2017, 5:27 PM
I installed this plugin, but couldn't set it up to properly interact with the Authorize.net sandbox account. Every time I try to enrol on a course using a student account and complete the order, after a short timeout it displays the following message:

The reporting of this transaction to the Merchant has timed out. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

This transaction has been approved.

It is advisable for you to contact the merchant to verify that you will receive the product or service.

Though it tells that the email messages were sent, I don't receive them. On top of the payment form there's a message Test Mode Is ON, though the test mode is turned off in the sandbox account settings.

After manually opening the enrolment page, I see the same enrolment options page with the payment button and the cost of the course.

Turning on the Check for production mode option results in the following error: (13) The merchant login ID or password is invalid or the account is inactive.

I tried googling these errors, but couldn't find a way to avoid them.

Thanks for any help.

Kind regards,

Maxim
• Thu, 23 Nov 2017, 4:05 PM
Hi! Maxim,
This is not a plugin issue, this is happening because of Sandbox environment of Authorize.net.
• Sun, 26 Nov 2017, 3:45 PM
I recommend to install latest version of this as it will all provide all features to you.
http://www.jestaplophotography.com/new-born-baby-photography-delhi.html