cancel
Showing results for 
Search instead for 
Did you mean: 

Partial refund error

Hello,
I am trying to sent partial refund but get error code 5 "A valid amount is required."

 

$creditCard = new AnetAPI\CreditCardType();
$creditCard->setCardNumber($lastFourDigits);
$creditCard->setExpirationDate("XXXX");
$paymentOne = new AnetAPI\PaymentType();
$paymentOne->setCreditCard($creditCard);

$transactionRequest = new AnetAPI\TransactionRequestType();
$transactionRequest->setTransactionType('refundTransaction');
$transactionRequest->setAmount(2.4);
$transactionRequest->setPayment($paymentOne);
$transactionRequest->setRefTransId($transaction_id);

Original transaction amount $8.39.

There are no filters for the size of the payment.

With a full refund, this code works.

 

What should I do for refund an amount that is less than that of orginal transaction amount?


Thank you in advance

Floyder
Member
0 REPLIES 0