Error bad character content for element 'avs_zipcode'

I am having a weird problem with the validation of the zip code.

 

If my zip code is longer than 9 character, i receive "Error bad character content for element 'avs_zipcode' but your document say that that maximum is s 30-character alphanumeric. (https://developer.moneris.com/Documentation/NA/E-Commerce%20Solutions/API/Purchase)


The zip code I use is: 1234567890. I know it is not a valid one, but I though the transaction would pass, but the validation of the zip code would fail, but the transaction fail.

 

I am using Hosted Tokenization if that matter.

 

Thank you

  • Hello,
    Hosted Tokenization does not have AVS built directly into it. Instead the iframe has CC number, expiry date, Card Verificaiton Digit values. Therefore, to perfom AVS you would be adding the ResPurchaseCC or ResAddToken with aVS fields.

    I know that a space is not permitted so if you copy/pate the data from a webform or a document, it could be that it's being passed to us and failing our validation.

    I ran a java transaction in my test code with your zipcode and wasnot able to get a failure. please see below.

    XML = <?xml version="1.0"?><request><store_id>store5</store_id><api_token>yesguy</api_token><purchase><order_id>normTest1554491784778</order_id><amount>14.92</amount><pan>4242424242424242</pan><expdate>2203</expdate><crypt_type>7</crypt_type><avs_info><avs_street_number>212</avs_street_number><avs_street_name>Payton Street</avs_street_name><avs_zipcode>1234567890</avs_zipcode><avs_email>test@host.com</avs_email><avs_hostname>hostname</avs_hostname><avs_browser>Mozilla</avs_browser><avs_shiptocountry>CAN</avs_shiptocountry><avs_shipmethod>G</avs_shipmethod><avs_custip>192.168.0.1</avs_custip><avs_custphone>5556667777</avs_custphone></avs_info><cvd_info><cvd_indicator>b</cvd_indicator><cvd_value>099</cvd_value></cvd_info></purchase></request>
    CardType = V
    TransAmount = 14.92
    TxnNumber = 348289-0_14
    ReceiptId = normTest1554491784778
    TransType = 00
    ReferenceNum = 660148420016881540
    ResponseCode = 027
    ISO = 01
    BankTotals = null
    Message = APPROVED * =
    AuthCode = 743746
    Complete = true
    TransDate = 2019-04-05
    TransTime = 15:16:25
    Ticket = null
    TimedOut = false
    Avs Response = null
    Cvd Response = bM
    ITD Response = null
    IsVisaDebit = false


    Could you advsie which API are you using or if you are building your XML from our DTD documentation?

    Thank you.
  • In reply to ND_Moneris:

    Sorry for the late answer,

    Sorry for confsuing you but we are doing a ResPurchaseCC with the .net api.

    I just tried it again, with the zip code: 1234567890 without any space and I still receive Error bad character content for element 'avs_zipcode'.

     

    The order Id I used for the test was SMD43573_157330