I am facing a problem in one of my project. I needed a custom description in every customer receipt email that is sent form the authorize.net. I looked into the uc_athorizet module for an alter before sending this information to authorize.net.

I hoping to see a drupal_alter before sending all the payment information to authorize.net so that I can easily alter the description before it is sent to authorize.net

Wouldn't it be good to have a drupal_alter('uc_authorizenet_transaction', $submit_data); before the curl function that posts $submit_data to authorize.net.

Unnikrishnan B.

#2 uc_authorizenet-transaction-alter-1840764-2.patch751 byteszyxware
PASSED: [[SimpleTest]]: [MySQL] 2,684 pass(es).
[ View ]


This is probably a good idea, if you post this change as a patch it is much more likely to be reviewed and included in Ubercart.

Version:7.x-3.2» 7.x-3.x-dev
Status:Active» Needs review
new751 bytes
PASSED: [[SimpleTest]]: [MySQL] 2,684 pass(es).
[ View ]

Here is the patch to add drupal_alter on $submit_data before posting the data to authorize.net.


Thanks for the patch. Can you give a code example of something in the data array you would change with this hook? We can then use that example as hook documentation in a uc_authorizenet.api.php file.

Our use case is that we needed a custom description to send to authorize.net. Authorize.net uses the description in the email that goes out to the customers. If I could alter the description field, I could add more details of the product purchased.

Unnikrishnan B.

So your code is something like this?

function MODULE_uc_authorizenet_transaction_alter(&$data) {
$data['x_description'] = 'Custom Authorize.Net transaction description.';

Status:Needs review» Fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.