cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Items AIM

I have been using John Conde class for doing all my ARB transactions.

However, Im using AIM for store orders now and I'm getting an error when I pass multiple items.

 

He uses this when inserting one item to buy in his class.

 

'lineItems' => array(
                'lineItem' => array(
                    'itemId' => '1',
                    'name' => 'vase',
                    'description' => 'Cannes logo',
                    'quantity' => '18',
                    'unitPrice' => '45.00',
                ),
            ),

 

However, I try to insert multiple items like so...

 

'lineItems' => array(
    'lineItem' => array(
	'itemId' => '1',
	'name' => 'vase',
	'description' => 'Cannes logo',
	'quantity' => '18',
	'unitPrice' => '45.00',
	),
    'lineItem' => array(
	'itemId' => '2',
	'name' => 'vase2',
	'description' => 'Cannes logo',
	'quantity' => '18',
	'unitPrice' => '45.00',
	),
),
				

 

When I run this, I only get the one item (2) on the recipt.  Is there another way to do this?

Wstar
Contributor
2 REPLIES 2

Anyone have any suggestions?

Wstar
Contributor

If you assign more than one value to the same key ("lineItem") in PHP, all assignments but the last one are ignored. I can't comment on how to do this properly, however - I always just work natively from the Authorize.net classes, which in the case of AIM, are fairly well-documented. Look in the doc folder of your SDK for the file AIM.markdown, it has all sorts of sample code you can use.

TJPride
Expert