cancel
Showing results for 
Search instead for 
Did you mean: 

Merchant Defined fields

Hi,

 

I would like to add a couple of merchant defined fields, (ie where you heard about us) and sent to the merchant in the email after purchase. I understand there is a way of doing this. Is there an example code (PHP)?  Do these fields have to be defined in the Merchant's dashboard or just code them in to the code.

 

Thanks

wyattbiker
Member
3 REPLIES 3

Any fields that are not define by authorize.net is merchant defined fields, you just need to code them to pass to the authorize.net url.

RaynorC1emen7
Expert

I tried adding the field to the XML file but it gives me an error that the fields are not allowed. When I add my own XML code I get this error when I add the "<source>test</source>".:

 

Response Reason Code: E00003
Response Text: The element 'ARBCreateSubscriptionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'source' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.

 

This is the XML layout from the ARB recuuring billing. Where would I add the extra definition fields?

 

$content =
        "<?xml version=\"1.0\" encoding=\"utf-8\"?>" .
        "<ARBCreateSubscriptionRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">" .
        "<merchantAuthentication>".
        "<name>" . $loginname . "</name>".
        "<transactionKey>" . $transactionkey . "</transactionKey>".
        "</merchantAuthentication>".
		"<refId>" . $refId . "</refId>".
        "<subscription>".
        "<name>" . $name . "</name>".
        "<paymentSchedule>".
        "<interval>".
        "<length>". $length ."</length>".
        "<unit>". $unit ."</unit>".
        "</interval>".
        "<startDate>" . $startDate . "</startDate>".
        "<totalOccurrences>". $totalOccurrences . "</totalOccurrences>".
        "<trialOccurrences>". $trialOccurrences . "</trialOccurrences>".
        "</paymentSchedule>".
        "<amount>". $amount ."</amount>".
        "<trialAmount>" . $trialAmount . "</trialAmount>".
        "<payment>".
        "<creditCard>".
        "<cardNumber>" . $cardNumber . "</cardNumber>".
        "<expirationDate>" . $expirationDate . "</expirationDate>".
        "</creditCard>".
        "</payment>".
		"<order><description>".$orderdescription."</description></order>".
		"<customer><email>". $customerEmail ."</email></customer>".
        "<billTo>".
        "<firstName>". $firstName . "</firstName>".
        "<lastName>" . $lastName . "</lastName>".
        "</billTo>".
        "</subscription>".
"<source>test</source>". "</ARBCreateSubscriptionRequest>";

 

oh. and ARB, I don't think that support it as authorize.net do not store any merchant defined fields on their side. It only good for AIM, SIM, DPM.