Zen Follower
- Join Date:
- Mar 2007
- Location:
- Pepperell, Massachusetts
- Posts:
- 232
- Plugin Contributions:
- 0
authorizenet_aim modified description
I needed attribute information in the authorizenet_aim payment module. I used the opportunity to change the format too.. ..it might be a useful option in the future to include or not include attribuets in the description.
// Create a string that contains a listing of products ordered for the description field
$description = '';
for ($i=0; $i<sizeof($order->products); $i++) {
$description .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'];
if (sizeof($order->products[$i]['attributes']) > 0) {
for ($j=0; $j<sizeof($order->products[$i]['attributes']); $j++) {
$description .= ' [' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . ']';
}
}
$description .= ' + ';
}
// Remove the last " + " from the string
$description = substr($description, 0, -3);
```SecurePay has a limit on this string and truncates ~100 characters, does anyone know if Authorize.net has a specific limit? I guess I'll find out.