cancel
Showing results for 
Search instead for 
Did you mean: 

ARBCreateSubscriptionRequest description / invoiceNumber problem

As the subject says, i'm currently passing both invoiceNumber and description in ARBCreateSubscriptionRequest -> subscription -> order and neither are coming through on my merchant email receipts. Any Ideas?

scriptworkz
Member
5 REPLIES 5

Are they displaying in your control panel? Or are they missing there too? Can you post the code you're using? Preferably in a code box, fourth option from the left in Rich Text mode.

TJPride
Expert

They are not showing up in the control panel, the code for the xml i'm posting is below and transactions go through fine.

 

$this->sub_content = '<?xml version="1.0" encoding="utf-8"?>';
			$this->sub_content .= '<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">';
			$this->sub_content .= '<merchantAuthentication>';
			$this->sub_content .= '<name>' . $this->api_login . '</name>';
			$this->sub_content .= '<transactionKey>' . $this->api_transKey . '</transactionKey>';
			$this->sub_content .= '</merchantAuthentication>';
			$this->sub_content .= '<refId>' . $this->createRefId() . '</refId>';
			$this->sub_content .= '<subscription>';
			$this->sub_content .= '<name>' . $this->clientInfo["sub_name"] . '</name>';
			$this->sub_content .= '<paymentSchedule>';
			$this->sub_content .= '<interval>';
			$this->sub_content .= '<length>' . $this->clientInfo["sub_length"] .'</length>';
			$this->sub_content .= '<unit>' . $this->clientInfo["sub_units"] .'</unit>';
			$this->sub_content .= '</interval>';
			$this->sub_content .= '<startDate>' . $this->clientInfo["sub_startDate"] . '</startDate>';
			$this->sub_content .= '<totalOccurrences>' . $this->clientInfo["sub_totalOccurrences"] . '</totalOccurrences>';
			if ($useTrials == true) :
				$this->sub_content .= '<trialOccurrences>' . $this->clientInfo["sub_trialOccurrences"] . '</trialOccurrences>';
			endif;
			$this->sub_content .= '</paymentSchedule>';
			$this->sub_content .= '<amount>' . $this->clientInfo["amount"] .'</amount>';
			if ($useTrials == true) :
				$this->sub_content .= '<trialAmount>' . $this->clientInfo["sub_trialAmount"] . '</trialAmount>';
			endif;
			$this->sub_content .= '<payment>';
			$this->sub_content .= '<creditCard>';
			$this->sub_content .= '<cardNumber>' . $this->clientInfo["cardNumber"] . '</cardNumber>';
			$this->sub_content .= '<expirationDate>' . $this->clientInfo["cardExpiryMonth"]. "/" . $this->clientInfo["cardExpiryYear"] . '</expirationDate>';
			$this->sub_content .= '</creditCard>';
			$this->sub_content .= '</payment>';
			$this->sub_content .= "<order>";
			$this->sub_content .= "<invoiceNumber>BHA-" . substr(md5('BHA-' . microtime()), 0, 16) . "</invoiceNumber>";
        	$this->sub_content .= "<description>BHA Subscription</description>";
	        $this->sub_content .= "</order>";
			$this->sub_content .= '<billTo>';
			$this->sub_content .= '<firstName>' . $this->clientInfo["firstName"] . '</firstName>';
			$this->sub_content .= '<lastName>' . $this->clientInfo["lastName"] . '</lastName>';
			$this->sub_content .= '</billTo>';
			//$this->sub_content .= '<x_duplicate_window>' . 0 . '</x_duplicate_window>';
			$this->sub_content .= '</subscription>';
			$this->sub_content .= '</ARBCreateSubscriptionRequest>';

 

And what's the text of the email you're getting?

It is the standard merchant receipt, the only problem is it's missing the invoice number and description, their just blank on the email.

If the XML is actually going through with a description AND no formatting error, it should be showing up in the control panel. Can you print out your XML the line before it's actually passed to Authorize.net to make absolutely sure the description hasn't magically disappeared somehow?