Posts: 12
Registered: ‎11-16-2011
CIM API (php) for refunding entire or partial transactions

I just started looking into the official PHP API code for the CIM module in order to allow my back-office software to be able to do refunds, but in the API docs, at least in the markup sample code, they do not show the structure for performing refunds, whether complete refunds for a transaction or alternatively a partial refund of a transaction.  In my case I would know the transaction # and customer ID, but I would prefer not to have to query ANet to get the customer's last 4 card digits.


First off, why would the CIM API library show refunds as a possible transaction type and then not even bother to include some sample code so that I do not have to sort through the CIM XML docs to try to figure out how to structure the call? It shows the very simple Void code, but someone seems to have gotten lazy on the sample code.


Does anyone have refund code in php that uses the official PHP API library?  Both partial and full refunds would be needed for my purposes (as for many merchants i suspect).


This must have been done a million times, I would prefer to be able to use the API library without having to worry about its guts.


Thanks, folks.

Ben Cahan

Who Me Too'd this topic