Posts: 4
Registered: ‎06-02-2010

Merchant Defined fields



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.



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

Re: Merchant Defined fields

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

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\">" .
        "<name>" . $loginname . "</name>".
        "<transactionKey>" . $transactionkey . "</transactionKey>".
		"<refId>" . $refId . "</refId>".
        "<name>" . $name . "</name>".
        "<length>". $length ."</length>".
        "<unit>". $unit ."</unit>".
        "<startDate>" . $startDate . "</startDate>".
        "<totalOccurrences>". $totalOccurrences . "</totalOccurrences>".
        "<trialOccurrences>". $trialOccurrences . "</trialOccurrences>".
        "<amount>". $amount ."</amount>".
        "<trialAmount>" . $trialAmount . "</trialAmount>".
        "<cardNumber>" . $cardNumber . "</cardNumber>".
        "<expirationDate>" . $expirationDate . "</expirationDate>".
		"<customer><email>". $customerEmail ."</email></customer>".
        "<firstName>". $firstName . "</firstName>".
        "<lastName>" . $lastName . "</lastName>".
"<source>test</source>". "</ARBCreateSubscriptionRequest>";


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

Re: Merchant Defined fields

[ Edited ]

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