Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Contributor
Posts: 12
Registered: ‎12-20-2012

negative value line item (showing credits on invoice)

What is the recommended procedure for showing credits on the invoice?

 

Using PHP:

$transactionRequest = new AuthorizeNetCIM;
return $transactionRequest->createCustomerProfileTransaction("AuthCapture", $transaction);

 

$transaction contains lineItems array. Would like to create line item that looks like:

 

$discountItem = new AuthorizeNetLineItem;
$discountItem->name = "Subscription Discount";
$discountItem->description= '[coupon] "FALL05 - 5% off Purchases over $100"'
$discountItem->quantity = 1;
$discountItem->unitPrice = -5.25;
$transaction->lineItems[] = $discountItem;

 

But documentation and other posts on the forums allude that unitPrice can't be negative.

 

What other strategies can I employ? My client would really like to show credits as a line item. I've suggested that maybe we could list them in a line item's description... but which one, when the discount applies to the total, and not one particular item?

 

I would like to entertain any of your suggestions. I've seen this question asked several times, but never any real solutions presented.

 

Is it possible to tell the gateway to not send the customer an email? That way I could build my own invoice and send it myself.

 

 

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: negative value line item (showing credits on invoice)

Is it possible to tell the gateway to not send the customer an email? That way I could build my own invoice and send it myself.

 

Yes, on the extraoptions add x_email_customer  = false