Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute 'id' must appear on element 'ns0:css' #16

Open
jedie opened this issue Jan 21, 2019 · 3 comments
Open

Attribute 'id' must appear on element 'ns0:css' #16

jedie opened this issue Jan 21, 2019 · 3 comments

Comments

@jedie
Copy link
Contributor

jedie commented Jan 21, 2019

After change to "suds-community" #15 i get:

XML request does not match XSD. The data is: cvc-complex-type.4: Attribute 'id' must appear on element 'ns0:css'..

    <complexType name="menuPreferences">
        <sequence>
            <element name="css" minOccurs="0" maxOccurs="1">
                <annotation>
                    <documentation>
                        The id of the CSS file that should be used in
                        the payment menu.
                    </documentation>
                </annotation>
                <complexType>
                    <attribute name="id" type="int" use="required"/>
                </complexType>
            </element>
        </sequence>
    </complexType>

This CSS ID is currently completely missing in django-oscar-docdata, isn't it?

jedie added a commit to wearehoods/django-oscar-docdata that referenced this issue Jan 21, 2019
jedie added a commit to wearehoods/django-oscar-docdata that referenced this issue Jan 21, 2019
jedie added a commit to wearehoods/django-oscar-docdata that referenced this issue Feb 1, 2019
@jedie
Copy link
Contributor Author

jedie commented Feb 1, 2019

2019-02-01 11:30:38,597    DEBUG .../python3.6/site-packages/suds/transport/http.py:80  sending:
URL: https://test.docdatapayments.com:443/ps/services/paymentservice/1_2
HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'SOAPAction': b'"create"', 'Content-type': 'text/xml; charset=utf-8', 'Soapaction': b'"create"'}
MESSAGE:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.docdatapayments.com/services/paymentservice/1_2/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <ns1:Body>
      <ns0:createRequest version="1.2">
         <ns0:merchant name="foobar-foobar" password="foobar"/>
         <ns0:merchantOrderReference>100005</ns0:merchantOrderReference>
         <ns0:paymentPreferences>
            <ns0:profile>test</ns0:profile>
            <ns0:numberOfDaysToPay>7</ns0:numberOfDaysToPay>
            <ns0:exhortation>
               <ns0:period1/>
               <ns0:period2/>
            </ns0:exhortation>
         </ns0:paymentPreferences>
         <ns0:menuPreferences>
            <ns0:css/>
         </ns0:menuPreferences>
         <ns0:shopper id="87">
            <ns0:name>
               <ns0:first>Mr. foobar</ns0:first>
               <ns0:last>No. 1</ns0:last>
            </ns0:name>
            <ns0:email>[email protected]</ns0:email>
            <ns0:language code="en"/>
            <ns0:gender>U</ns0:gender>
         </ns0:shopper>
         <ns0:totalGrossAmount currency="EUR">500</ns0:totalGrossAmount>
         <ns0:billTo>
            <ns0:name>
               <ns0:first>Mr. foobar</ns0:first>
               <ns0:last>No. 1</ns0:last>
            </ns0:name>
            <ns0:address>
               <ns0:street>billing address</ns0:street>
               <ns0:houseNumber>N/A</ns0:houseNumber>
               <ns0:postalCode>billingzip</ns0:postalCode>
               <ns0:city>billing city</ns0:city>
               <ns0:country code="JM"/>
            </ns0:address>
         </ns0:billTo>
         <ns0:description>User-ID: 87, 1x1x foo</ns0:description>
         <ns0:includeCosts>false</ns0:includeCosts>
         <ns0:invoice>
            <ns0:totalNetAmount currency="EUR">500</ns0:totalNetAmount>
            <ddp:totalVatAmount xmlns:ddp="http://www.docdatapayments.com/services/paymentservice/1_2/" rate="0" currency="EUR">0</ddp:totalVatAmount>
            <ns0:item number="4">
               <ns0:name>1x foo</ns0:name>
               <ns0:code>1_credits</ns0:code>
               <ddp:quantity xmlns:ddp="http://www.docdatapayments.com/services/paymentservice/1_2/" unitOfMeasure="PCS">1</ddp:quantity>
               <ns0:description>-</ns0:description>
               <ns0:netAmount currency="EUR">500</ns0:netAmount>
               <ns0:grossAmount currency="EUR">500</ns0:grossAmount>
               <ns0:vat rate="0">
                  <ns0:amount currency="EUR">0</ns0:amount>
               </ns0:vat>
               <ns0:totalNetAmount currency="EUR">500</ns0:totalNetAmount>
               <ns0:totalGrossAmount currency="EUR">500</ns0:totalGrossAmount>
               <ns0:totalVat rate="0">
                  <ns0:amount currency="EUR">0</ns0:amount>
               </ns0:totalVat>
            </ns0:item>
            <ns0:shipTo>
               <ns0:name>
                  <ns0:first>Mr. foobar</ns0:first>
                  <ns0:last>No. 1</ns0:last>
               </ns0:name>
               <ns0:address>
                  <ns0:street>billing address</ns0:street>
                  <ns0:houseNumber>N/A</ns0:houseNumber>
                  <ns0:postalCode>billingzip</ns0:postalCode>
                  <ns0:city>billing city</ns0:city>
                  <ns0:country code="JM"/>
               </ns0:address>
            </ns0:shipTo>
         </ns0:invoice>
         <ns0:integrationInfo>
            <ns0:webshopPlugin>django-oscar-docdata</ns0:webshopPlugin>
            <ns0:webshopPluginVersion>1.2.13.pre0</ns0:webshopPluginVersion>
            <ns0:programmingLanguage>Python</ns0:programmingLanguage>
         </ns0:integrationInfo>
      </ns0:createRequest>
   </ns1:Body>
</SOAP-ENV:Envelope>

2019-02-01 11:30:38,705    DEBUG .../python3.6/site-packages/suds/transport/http.py:87  received:
CODE: HTTPStatus.OK
HEADERS: Date: Fri, 01 Feb 2019 11:30:38 GMT
Server: Apache
Vary: Accept-Encoding
Connection: close
Transfer-Encoding: chunked
Content-Type: text/xml;charset=utf-8
Set-Cookie: SESSPERSIST=10|XFQt4; path=/; HttpOnly; Secure


MESSAGE:
<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><createResponse xmlns="http://www.docdatapayments.com/services/paymentservice/1_2/"><createError><error code="REQUEST_DATA_INCORRECT">XML request does not match XSD. The data is: cvc-complex-type.4: Attribute 'id' must appear on element 'ns0:css'..</error></createError></createResponse></S:Body></S:Envelope>

@maerteijn
Copy link
Member

Shall we close this issue until we decide to spend time on changing to suds-community ?

@maerteijn maerteijn added the bug label Feb 1, 2019
@jedie
Copy link
Contributor Author

jedie commented Feb 1, 2019

Or you tag all related issues with "suds-community" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants