Ви знаходитеся тут: Головна / Подключение Money Transfer / XSD scheme / ReversalRequest

ReversalRequest

створив(ла) Igor Uleschenko Востаннє змінено: Вер 12, 2019 10:34

 

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
           version="1.0"
           elementFormDefault="qualified"
           attributeFormDefault="qualified">

    <xs:import namespace="http://www.w3.org/2000/09/xmldsig#"
               schemaLocation="classpath:schemas/xmldsig-core-schema.xsd"/>

    <xs:element name="ReversalRequest" type="reversalRequest"/>

    <xs:complexType name="reversalRequest">
        <xs:all>
            <xs:element name="MerchantId" type="merchantId"/>
            <xs:element name="TerminalId" type="terminalId" minOccurs="0"/>
            <xs:element name="TrackingId" type="trackingId"/>
            <xs:element name="Amount" type="amount"/>
            <xs:element name="Funding" type="tranResult"/>
            <xs:element ref="ds:Signature" minOccurs="0"/>
        </xs:all>
    </xs:complexType>

    <xs:simpleType name="merchantId">
        <xs:restriction base="xs:string">
            <xs:pattern value="[A-Za-z0-9]{1,15}"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="terminalId">
        <xs:restriction base="xs:string">
            <xs:pattern value="[A-Za-z0-9]{1,8}"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="trackingId">
        <xs:restriction base="xs:string">
            <xs:pattern value="[A-Za-z0-9]{1,16}"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="currencyNumericCode">
        <xs:restriction base="xs:string">
            <xs:pattern value="[0-9]{3}"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="amount">
        <xs:all>
            <xs:element name="Value" type="xs:nonNegativeInteger"/>
            <xs:element name="CurrencyCode" type="currencyNumericCode"/>
            <xs:element name="Surcharge" type="xs:nonNegativeInteger" minOccurs="0"/>
        </xs:all>
    </xs:complexType>

    <xs:complexType name="tranResult">
        <xs:all>
            <xs:element name="ApprovalCode" type="approvalCode"/>
            <xs:element name="RRN" type="rrn"/>
        </xs:all>
    </xs:complexType>

    <xs:simpleType name="approvalCode">
        <xs:restriction base="xs:string">
            <xs:pattern value="[A-Za-z0-9]{6}"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="rrn">
        <xs:restriction base="xs:string">
            <xs:pattern value="[A-Za-z0-9]{12}"/>
        </xs:restriction>
    </xs:simpleType>

</xs:schema>