Thanks for the heads up on this thread.
s2Member’s integration with Authorize.Net does NOT allow you to create Custom Registration/Profile Fields from your s2Member configuration panel, and map those to Authorize.Net API calls. s2Member only sends Authorize.Net the information required to complete the transaction itself. All other information (i.e. any Custom Fields that you add), will be stored in WordPress and associated with the customer’s account record in WordPress, and only in WordPress.
That being said, you are correct that Authorize.Net DOES support a company field. So if you wanted to map your Custom Registration Field that you created with s2Member to an API call that passes that info over to Authorize.Net, you will need to custom code this.
Here is a quick overview of what it might take…
Open /s2member-pro/includes/classess/gateways/authnet/authnet-checkout-in.inc.php
Find all lines which contain:
$_authnet["x_first_name"] = $post_vars["first_name"];
Add a line beneath each instance that you find.
$_authnet["x_first_name"] = $post_vars["first_name"];
$_authnet["x_company"] = $post_vars["custom_fields"]["company"];
This assumes that you gave your Custom Registration/Profile Field (when you configured it with s2Member), the Field ID: company. If you did NOT give it this Field ID, then please change the code snippet above where you see reference to the Field ID (i.e. ["company"]
).
See also: Dashboard -› s2Member® -› General Options -› Registration/Profile Fields