cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

What values map to receipt fields?

Hi there,

 

We have been using Authorize.net for a while now and populating only the most necessary fields in our API calls (to avoid confusion we are using this API: https://developer.authorize.net/api/reference/).

We are now trying to add a bit more detail to our transactions, and a few of the fields we see on the receipts/transaction tables are not clearly coming from a certain field set in the transaction call. Specifically, when viewing the table of unsettled transactions, there is a column "Customer". I would expect a the value I set using the PHP SDK as such

$customerData->setId($customer_name);

 

to show up in this field. Instead, nothing shows up. In the first image below you can see this. In the second image below you can see that Customer ID is indeed populated with a $customer_name. This is the first question I'd like answered. What do I need to set to see a value on the table in the Customer column?

My next question is even more mysterious to me. In the receipt shown in the second image below, there is a place for the Order Number. I cannot for the life of me figure out what is supposed to be populated here (that I can set using the PHP SDK for the API I am using). I've tried the refId but that did not show up. I'd very much appreciate knowing how I can populate that field using this API and SDK.

 

Thanks very much for your time,

 

Fivable

 

image.png

 

image (1).png

fivable
Contributor
10 REPLIES 10

Customer is: billing last name, billing first name

I'm not familiar with the PHP SDK, but hopefully that is a start!

mmcguire
Administrator Administrator
Administrator

Thanks mmcguire, that is very helpful and gets me halfway there. The Order Number is definitely something I need to figure out so I hope somebody with the answer comes along, but I greatly appreciate your help.

Does anybody have any insight into the Order Number shown and how to set it?

Hello @fivable

 

For your question about Order Number, could you walk us through the steps you're taking to generate the transaction and receipt, including SDK version and methods?

 

Richard

We are using the authorizenet/authorizenet composer package version 1.9.6. Currently I create a MerchantAuthenticationType, anOpaqueDataType, a PaymentType, an OrderType, a CustomerDataType, a CustomerAddressType, a TransactionRequestType, and then a CreateTransactionRequest which I pass to a CreateTransactionController, which I then use with the production endpoint to execute the API call. Each of the objects takes other settings, such as setting the invoice number of the order. I've removed some unecessary logic and replaced with 'xxxx' to stand for some value I've calculated or retrieved.

//reusable components (auth credentials, opaque data, and payment info)
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
$merchantAuthentication->setName(xxxx);
$merchantAuthentication->setTransactionKey(xxxx);
$opaqueData = new AnetAPI\OpaqueDataType();
$opaqueData->setDataDescriptor(xxxx);
$opaqueData->setDataValue(xxxx);
$payment = new AnetAPI\PaymentType();
$payment->setOpaqueData($opaqueData);

// Create order information
$order = new AnetAPI\OrderType();
$order->setInvoiceNumber(xxxx);
$order->setDescription(xxxx);

// Set the customer's identifying information
$customerData = new AnetAPI\CustomerDataType();
$customerData->setId(xxxx);
$customerAddress = new AnetAPI\CustomerAddressType();
$customerAddress->setLastName(xxxx);


// // authorize and capture the amount_due transaction (Create an accept transaction)
//set up transaction request details
$transactionRequestType = new AnetAPI\TransactionRequestType();
$transactionRequestType->setTransactionType('authCaptureTransaction');
$transactionRequestType->setAmount(xxxx);
$transactionRequestType->setPayment($payment);
$transactionRequestType->setOrder($order);
$transactionRequestType->setCustomer($customerData);
$transactionRequestType->setBillTo($customerAddress);
//create and send request
$request = new AnetAPI\CreateTransactionRequest();
$request->setMerchantAuthentication($merchantAuthentication);
$request->setTransactionRequest($transactionRequestType);
$controller = new AnetController\CreateTransactionController($request);
$response = $controller->executeWithApiResponse(env('ANET_ENVIRONMENT', 'https://apitest.authorize.net/xml/v1/request.api'));

This is the entire process up to sending the API call. Everything works fine, the only problem is I don't know what to add to all of this to populate something in the previously pictured "Order Number".

As far as the receipt itself, it is coming from the unsettled transactions screen in our developer sandbox account, but we know our client also sees it (possibly in an email, I'm not actually sure).

Thank you @fivable for the detail.  I was able to duplicate the same receipt experience from within the Sandbox using Virtual Terminal and then clicking on View Printable Receipt.  Next I'll escalate this question to our product team.

 

Richard

Thanks Richard!

Do I need to follow up with somebody or can I hope for a response here from the product team?

Hello @fivable

 

No need to follow-up, you just don't see the internal discussion we're having about this field on the receipt.  We're tracking down a definitive response.

 

Richard