• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Setting up Authorize.net

Setting up Authorize.net 12 years 9 months ago #14051

  • dergoog
  • dergoog's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 6
OK. I had a nightmare of a time setting up authorize.net for the RS Membership. I am making this post in hopes it will help someone avoid the hours I had to spend to get this working.

First note: Versions.
As of this post they are on Rev 17 of RSMembership. If you do not update your RSMembership to rev 17 prior to installing and turning on the Authnet plugin, your site will break on both the front and back. If this happens you can comment out (precede them with a #) lines 37 and 38 of the authnet plugin file found here: /plugins/system/rsmembershipauthorize.php

This will allow you to log back in and update your RSMembership to Rev 17 (or later). Once updated remove your comments - especially if you're running Joomla 1.6!

Second note: Language
When you update your RSMembership it is important to note that it will replace your language file. So if like me you've eliminated its UK venacular, you will lose those changes if you don't make a backup of them.

The current plugin for authnet does not install its language file (it was not included as a part of the install in its xml file). This results in the pay screen showing the variable names for the language items. The quick fix is to unzip the install file and copy its language file (it has a .ini extension) to your language folder found here: /language/en-GB (assuming you are using en-GB language) I don't think this will affect you if you had a previous version of the plugin installed.

Third note: Authnet settings
Authorize.net has a setting for delimiters, if these were configured for a different server or application prior to this use it is likely your form will not get past the "pay" page and confirm the order under the automatic settings. You will see the error image with a note stating "Transaction Approved" or something like that. The big problem is that people can keep hitting your pay button and re-running the transaction and it will only appear as one pending transaction in your RSMembership.

To fix this, make sure your Direct Response Setting is set to use delimiters. Use a pipe "|" as a field separator and no encapsulating characters.

Fourth note: Existing accounts
The auto user generation runs into issues when someone uses an email address twice. I believe it is supposed to report back an error that it is in use, but mine did not. Instead it populated the new membership order with the profile information of the other user with the same address. The only fix I had for this was to make sure my user list was limited to me only and no chance of an email address being used twice. I also put an alert into the language file alongside the email address label telling people to use their user's unique email address"

Fifth note: Communications
If you have the Joomla Global setting set for users to authenticate their email (have it send them an activation email) its important to note you can't modify this email in the authnet messages tab. It is hidden in the language file. If you need to change its language do so with care to the %S markers - taking them out of order will screw it up. Those insert user information and are hard coded in that order. I would just turn off the authentication.

Making it better
Nothing ever works as well as you want, and RSMembership has many shortcomings compared to the quality of some RSJoomla's other components. It doesn't hold a candle to RSForm pro. It's forms are formatted in tables, and have no where near the customization and power that RSForm has, nor does it have the attention to detail.

This really shows in the authnet plugin. I could not get their current code to actually post any reference into the hash column of my transactions. This made it impossible to track what payment belonged to which user, especially if that user ever changed their email address and/or it was paid for using a card in someone else's name.

To fix this for myself, I modified the plugin file with this code starting around line 409. NOTE: If you use this, make a backup of your file FIRST.
// This line takes the response and breaks it into an array using the specified delimiting character
				$response = explode('|',$response);
 
				if ($response[0] == 1)
				{
					if (!$is_recurring)
					{
						$this->emptyDelayedTransaction();
 
						#$row->hash = $response[6];
						$row->hash = "Invoice #: ".substr(md5($row->id.' '.$this->_params->get('x_login').' '.$this->_params->get('x_tran_key')),0,20); // order num (unique)
						$row->response_log = "This order was processed with a card in the name of ".$cc_fname." ".$cc_lname; // trying to give a little more correlation
						$row->store();
 
						RSMembership::finalize($row->get('id'));
						RSMembership::approve($row->get('id'));
					}

What the above will do is insert the same invoice number pushed to authnet and then record the card holder's name in the Log of the transaction. This gives you two solid points of reference, and should make it so 99% of the time you can just look at the record in RSMembership without having to dig through your transactions in Authnet to see who's card was used to pay for the membership.

Was this helpful to you? I hope so.

Things I couldn't figure out how to do: post custom field data into the log as well -- any help on that would be appreciated.

Best,

Brian Greenwood
The Creative Good
http://www.thecreativegood.org
Last Edit: 12 years 8 months ago by octavian.
The administrator has disabled public write access.

Re:Setting up Authorize.net 12 years 8 months ago #14078

  • octavian
  • octavian's Avatar
  • NOW ONLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

Some notes of my own:
1) You should never install a plugin first and then the component. The plugin works with the latest version of RSMembership! only, so please install them in this order: component, then plugins.

2) The language tag is actually inside the xml file and has always been. I think the language file was not copied on your server due to lack of permissions on either the en-GB/ folder or the en-GB.plg_system_rsmembershipauthorize.ini file.

Regarding language strings... unfortunately there's no way to "update" or "append" new language strings in Joomla!. This is how it was designed, it copies & overwrites the language strings with each update. I'm hoping in the future there will be some improvements on this side without any hacks from the developer's side.

3) The plugin sends the pipe (|) delimiter to Authorize.net so that it can return the results separated by this character. Some other settings in your Merchant Account may override this setting, but 99% people don't touch them and work with the default settings.

4) RSMembership! was designed this way - just like our RSTickets!/RSTickets! Pro component. This way, you can make a purchase in the name of another person or without being logged in. This actually helps users, since most users will tend to use the same email address when purchasing and won't end up with several accounts.

5) Nothing is hidden - language files are known to be an important part of Joomla! and if you want to modify something in the language, that's where you would go. Just like if you want to modify the registration email from your standard Joomla! registration (com_user) you would go to the language files.

6) RSMembership! is not a form builder this is why it's obvious that by comparing the two, RSForm! Pro would win when dealing with forms, since it does just that. It's like comparing RSForm! Pro with RSMembership! when it comes to handling online content sharing, downloads, transactions and reports :)
The response log is a new feature in R17 and I agree that even though we focused on the PayPal plugin (this has always been harder to debug since the responses weren't instant like those in Authorize.net. Now with the response log you can see exactly what happened, step by step), the Authorize.net could use a response log as well.

Regarding custom fields in the response log, this example will be helpful to you, or anyone with enough background PHP knowledge such as yourself :)
if ($row->user_data)
{
	$user_data = unserialize($row->user_data);
	// Example when using a field named "country"
	$row->response_log .= 'Adding payment from Country: '.$user_data->fields->country;
	// All fields are contained in $user_data->fields. Other information such as name & username are directly in $user_data.
}
The above code can be added just BEFORE:
$row->store();
If you add it after that, the response log will not be saved.

Regards and thank you for the suggestions, they will be taken into account when we update RSMembership! again.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 12 years 8 months ago by octavian.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!