01-29-2013 05:27 PM
I am having trouble Refunding a transcation using the AIM API. Here is my code so far using PHP:
$payment = new AuthnetAIM('blah', 'blahblah'); $payment->setTransactionType("CREDIT"); //This is for refunds only $payment->setTransaction(XXXX1111, 1.00, "$transaction_id"); $payment->setParameter("x_email", $email); $payment->setParameter("x_email_customer", TRUE); //Enable Authorize.net auto customer email $payment->setParameter("x_description", "Refund"); $payment->process();
I keep getting an error message saying that the expiration date is required. Any thoughts? In the documentation it says that only the last 4 of the credit card used, amount, and transaction ID are required.
02-05-2013 03:43 PM
02-06-2013 11:33 AM
Yes, go into your SDK (I'm assuming you're using PHP?) and look in the doc folder for a file called AIM.markdown. It will give you fairly clear code samples for a wide variety of things. If you use some third-party library, nobody is probably going to be able to help.