Reply
Member
Posts: 4
Registered: ‎06-02-2010

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

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

Re: Merchant Defined fields

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.

Member
Posts: 4
Registered: ‎06-02-2010

Re: Merchant Defined fields

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>";

 

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

Re: Merchant Defined fields

[ Edited ]

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.