Contributor
Posts: 23
Registered: ‎12-02-2010
Refund payments using AIM API

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.

Who Me Too'd this topic