Hi,
I'm using the Capture Previously Authorized Amount api call and I'm able to capture and set the amount. Though, when I set the description and invoicenumber on the <order> tag, the description and invoicenumber do not get changed when I check the transaction in the sandbox.
Is it even possible to set the description and invoice number or just the amount?
Below is the code I'm using to send the request.
$orderRequestType = new AnetAPI\OrderType(); $orderRequestType->setInvoiceNumber($invoiceNumber); $orderRequestType->setDescription("Reprocessing transaction"); $transactionRequestType = new AnetAPI\TransactionRequestType(); $transactionRequestType->setTransactionType("priorAuthCaptureTransaction"); $transactionRequestType->setAmount($dueAmount); $transactionRequestType->setOrder($orderRequestType); $transactionRequestType->setRefTransId($externalTransactionID); $request = new AnetAPI\CreateTransactionRequest(); $request->setMerchantAuthentication($this->merchantAuthentication); $request->setRefId( $this->refId); $request->setTransactionRequest($transactionRequestType); echo $request->getTransactionRequest()->getOrder()->getInvoiceNumber(); //debug, this prints the correct string $controller = new AnetController\CreateTransactionController($request); $response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);
Solved! Go to Solution.
01-17-2018 09:50 AM