cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid child element in hostedPaymentSettings

I am trying to change some of the settings in the hostedPaymentSettings and whenever I try to add any settingValue I always get an error.

 

Here is my request:

<getHostedPaymentPageRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
    <merchantAuthentication></merchantAuthentication>
    <transactionRequest>
        <transactionType>authCaptureTransaction</transactionType>
        <amount>22.50</amount>
        <order>
            <invoiceNumber>INV-12345</invoiceNumber>
            <description>Product Description</description>
        </order>
        <lineItems>
            <lineItem>
                <itemId>2</itemId>
                <name>vase</name>
                <description>Cannes logo </description>
                <quantity>18</quantity>
                <unitPrice>45.00</unitPrice>
            </lineItem>
        </lineItems>
        <tax>
            <amount>4.26</amount>
            <name>level2 tax name</name>
            <description>level2 tax</description>
        </tax>
        <duty>
            <amount>8.55</amount>
            <name>duty name</name>
            <description>duty description</description>
        </duty>
        <shipping>
            <amount>4.26</amount>
            <name>level2 tax name</name>
            <description>level2 tax</description>
        </shipping>
        <poNumber>456654</poNumber>
        <customer>
            <id>1812940934</id>
            <email>my@email.com</email>
        </customer>
        <billTo>
            <firstName>Ellen</firstName>
            <lastName>Johnson</lastName>
            <company>Souveniropolis</company>
            <address>14 Main Street</address>
            <city>Pecan Springs</city>
            <state>TX</state>
            <zip>44628</zip>
            <country>USA</country>
            <phoneNumber>1231231234</phoneNumber>
        </billTo>
        <customerIP>192.168.1.1</customerIP>
    <userFields>
          <userField>
             <name>sessionID</name>
             <value>ABC123</value>
          </userField>
        </userFields>
    </transactionRequest>
    <hostedPaymentSettings>
        <setting>
            <settingName>hostedPaymentIFrameCommunicatorUrl</settingName>
        </setting>
        <setting>
            <settingName>hostedPaymentButtonOptions</settingName>
            <settingValue>{"text": "Pay"}</settingValue>
        </setting>
        <setting>
            <settingName>hostedPaymentReturnOptions</settingName>
            <settingValue>{"url": https://www.mytestsite.com/done.php}</settingValue>
        </setting>
        <setting>
            <settingName>hostedPaymentOrderOptions</settingName>
            <settingValue>{"show": false}</settingValue>
        </setting>
        <setting>
            <settingName>hostedPaymentPaymentOptions</settingName>
            <settingValue>{"cardCodeRequired": true}</settingValue>
        </setting>
        <setting>
            <settingName>hostedPaymentShippingAddressOptions</settingName>
            <settingValue>{"show": false, "required":true}</settingValue>
        </setting>
        <setting>
            <settingName>hostedPaymentBillingAddressOptions</settingName>
            <settingValue>{"show": true, "required":true}</settingValue>
        </setting>
        <setting>
            <settingName>hostedPaymentSecurityOptions</settingName>
            <settingValue>{"captcha": false}</settingValue>
        </setting>
        <setting>
            <settingName>hostedPaymentStyleOptions</settingName>
            <settingValue>{"bgColor": "green"}</settingValue>
        </setting>
        <setting>
            <settingName>hostedPaymentCustomerOptions</settingName>
            <settingValue>{"showEmail": true, "requiredEmail":true}</settingValue>
        </setting>
    </hostedPaymentSettings>
</getHostedPaymentPageRequest>

 

Here is the error:

The element 'setting' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'settingValue' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
PcDudes524
Contributor
10 REPLIES 10

Ok, I will do some more testing and see if I can find the error. Thank you