<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="wppapi-v0.1" targetNamespace="https://billing.webpay.by/WPPAPI-V0.1/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="https://billing.webpay.by/WPPAPI-V0.1/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <wsdl:types>
        <xsd:schema targetNamespace="https://billing.webpay.by/WPPAPI-V0.1/" xmlns:tns="https://billing.webpay.by/WPPAPI-V0.1/" elementFormDefault="qualified">
            <!-- TransactionCancel -->
            <xsd:complexType name="TransactionCancelRequest">
                <xsd:sequence>
                    <xsd:element name='store_id'        type='xsd:string'/>
                    <xsd:element name='login'          type='xsd:string'/>
                    <xsd:element name='password'       type='xsd:string'/>
                    <xsd:element name='transaction_id' type='xsd:string'/>
                    <xsd:element name='amount'         type='xsd:float'/>
                    <xsd:element name='currency'       type='xsd:string'/>
                    <xsd:element name='cancel_reason'  type='xsd:string' nillable='true'/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="TransactionCancelResponse">
                <xsd:sequence>
                    <xsd:element name='transaction_id' type='xsd:string' nillable='true'/>
                    <xsd:element name='error_code' type='xsd:string'/>
                    <xsd:element name='error_comment' type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>
            <!-- /TransactionCancel -->
            <!-- TransactionRefund -->
            <xsd:complexType name="TransactionRefundRequest">
                <xsd:sequence>
                    <xsd:element name='store_id'       type='xsd:string'/>
                    <xsd:element name='login'          type='xsd:string'/>
                    <xsd:element name='password'       type='xsd:string'/>
                    <xsd:element name='transaction_id' type='xsd:string'/>
                    <xsd:element name='amount'         type='xsd:float'/>
                    <xsd:element name='currency'       type='xsd:string'/>
                    <xsd:element name='refund_reason'  type='xsd:string' nillable='true'/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="TransactionRefundResponse">
                <xsd:sequence>
                    <xsd:element name='transaction_id' type='xsd:string' nillable='true'/>
                    <xsd:element name='error_code' type='xsd:string'/>
                    <xsd:element name='error_comment' type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>
            <!-- /TransactionRefund -->
            <!-- TransactionComplete -->
            <xsd:complexType name="TransactionCompleteRequest">
                <xsd:sequence>
                    <xsd:element name='store_id'       type='xsd:string'/>
                    <xsd:element name='login'          type='xsd:string'/>
                    <xsd:element name='password'       type='xsd:string'/>
                    <xsd:element name='transaction_id' type='xsd:string'/>
                    <xsd:element name='amount'         type='xsd:float'/>
                    <xsd:element name='currency'       type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="TransactionCompleteResponse">
                <xsd:sequence>
                    <xsd:element name='transaction_id' type='xsd:string' nillable='true'/>
                    <xsd:element name='error_code' type='xsd:string'/>
                    <xsd:element name='error_comment' type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>
            <!-- /TransactionComplete -->
            <!-- TransactionCompleteWithSou -->
            <xsd:complexType name="TransactionCompleteWithSouRequest">
                <xsd:sequence>
                    <xsd:element name='store_id'            type='xsd:string'/>
                    <xsd:element name='login'               type='xsd:string'/>
                    <xsd:element name='password'            type='xsd:string'/>
                    <xsd:element name='transaction_id'      type='xsd:string'/>
                    <xsd:element name='amount'              type='xsd:float'/>
                    <xsd:element name='currency'            type='xsd:string'/>
                    <xsd:element name='service_number'      type='xsd:string'/>
                    <xsd:element name='service_account'     type='xsd:string'/>
                    <xsd:element name='service_via_belqi'   type='xsd:integer' nillable="true"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="TransactionCompleteWithSouResponse">
                <xsd:sequence>
                    <xsd:element name='transaction_id' type='xsd:string' nillable='true'/>
                    <xsd:element name='error_code' type='xsd:string'/>
                    <xsd:element name='error_comment' type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>
            <!-- /TransactionCompleteWithSou -->
            <!-- GetTransactionStatusRequest -->
            <xsd:complexType  name="GetTransactionStatusRequest">
                <xsd:sequence>
                    <xsd:element name='store_id' type='xsd:string'/>
                    <xsd:element name='login' type='xsd:string'/>
                    <xsd:element name='password' type='xsd:string'/>
                    <xsd:element name='order_num' nillable='true' type='xsd:string'/>
                    <xsd:element name='startmin' nillable='true' type='xsd:string'/>
                    <xsd:element name='starthour' nillable='true' type='xsd:string'/>
                    <xsd:element name='startday' nillable='true' type='xsd:string'/>
                    <xsd:element name='startmonth' nillable='true' type='xsd:string'/>
                    <xsd:element name='startyear' nillable='true' type='xsd:string'/>
                    <xsd:element name='endmin' nillable='true' type='xsd:string'/>
                    <xsd:element name='endhour' nillable='true' type='xsd:string'/>
                    <xsd:element name='endday' nillable='true' type='xsd:string'/>
                    <xsd:element name='endmonth' nillable='true' type='xsd:string'/>
                    <xsd:element name='endyear' nillable='true' type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="TransactionStatusStruct">
                <xsd:sequence>
                    <xsd:element name='order_num' nillable='true' type='xsd:string'/>
                    <xsd:element name='transaction_id' nillable='true' type='xsd:string'/>
                    <xsd:element name='date' nillable='true' type='xsd:string'/>
                    <xsd:element name='status' nillable='true' type='xsd:string'/>
                    <xsd:element name='amount' nillable='true' type='xsd:string'/>
                    <xsd:element name='currency' nillable='true' type='xsd:string'/>
                    <xsd:element name='response_code' nillable='true' type='xsd:string'/>
                    <xsd:element name='response_text' nillable='true' type='xsd:string'/>
                    <xsd:element name='approval_code' nillable='true' type='xsd:string'/>
                    <xsd:element name='card_type' nillable='true' type='xsd:string'/>
                    <xsd:element name='card_number' nillable='true' type='xsd:string'/>
                    <xsd:element name='card_country' nillable='true' type='xsd:string'/>
                    <xsd:element name='payer_name' nillable='true' type='xsd:string'/>
                    <xsd:element name='payer_email' nillable='true' type='xsd:string'/>
                    <xsd:element name='payer_ip' nillable='true' type='xsd:string'/>
                    <xsd:element name='payment_type' nillable='true' type='xsd:string'/>
                    <xsd:element name='comment' nillable='true' type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="GetTransactionStatusResponse" base="SOAP-ENC:Array">
                <xsd:sequence>
                    <xsd:element name="transaction" type="tns:TransactionStatusStruct" maxOccurs="unbounded" nillable='true'/>
                    <xsd:element name='error_code' nillable='true' type='xsd:string'/>
                    <xsd:element name='error_comment' nillable='true' type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>
            <!-- /GetTransactionStatusRequest -->

            <xsd:complexType  name="GetInvoiceUrlRequest">
                <xsd:sequence>
                    <xsd:element name='store_id' type='xsd:string'/>
                    <xsd:element name='login' type='xsd:string'/>
                    <xsd:element name='password' type='xsd:string'/>
                    <xsd:element name='invoice_id' type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="GetInvoiceUrlResponse">
                <xsd:sequence>
                    <xsd:element name='invoice_url' type='xsd:string' nillable='true'/>
                    <xsd:element name='error_code' type='xsd:string'/>
                    <xsd:element name='error_comment' type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:schema>
    </wsdl:types>

    <wsdl:message name="GetTransactionStatusRequest">
        <wsdl:part name="parameters" type="tns:GetTransactionStatusRequest"/>
    </wsdl:message>
    <wsdl:message name="GetTransactionStatusResponse">
        <wsdl:part name="transactions" type="tns:GetTransactionStatusResponse"/>
    </wsdl:message>
    <wsdl:message name="TransactionCompleteRequest">
        <wsdl:part name="parameters" type="tns:TransactionCompleteRequest"/>
    </wsdl:message>
    <wsdl:message name="TransactionCompleteResponse">
        <wsdl:part name="return" type="tns:TransactionCompleteResponse"/>
    </wsdl:message>
    <wsdl:message name="TransactionCompleteWithSouRequest">
        <wsdl:part name="parameters" type="tns:TransactionCompleteWithSouRequest"/>
    </wsdl:message>
    <wsdl:message name="TransactionCompleteWithSouResponse">
        <wsdl:part name="return" type="tns:TransactionCompleteWithSouResponse"/>
    </wsdl:message>
    <wsdl:message name="TransactionCancelRequest">
        <wsdl:part name="parameters" type="tns:TransactionCancelRequest"/>
    </wsdl:message>
    <wsdl:message name="TransactionCancelResponse">
        <wsdl:part name="return" type="tns:TransactionCancelResponse"/>
    </wsdl:message>
    <wsdl:message name="TransactionRefundRequest">
        <wsdl:part name="parameters" type="tns:TransactionRefundRequest"/>
    </wsdl:message>
    <wsdl:message name="TransactionRefundResponse">
        <wsdl:part name="return" type="tns:TransactionRefundResponse"/>
    </wsdl:message>
    <wsdl:message name="GetInvoiceUrlRequest">
        <wsdl:part name="parameters" type="tns:GetInvoiceUrlRequest"/>
    </wsdl:message>
    <wsdl:message name="GetInvoiceUrlResponse">
        <wsdl:part name="return" type="tns:GetInvoiceUrlResponse"/>
    </wsdl:message>

    <wsdl:portType name="wsbPort">
        <wsdl:operation name="GetTransactionStatus">
            <wsdl:input message="tns:GetTransactionStatusRequest"/>
            <wsdl:output message="tns:GetTransactionStatusResponse"/>
        </wsdl:operation>
        <wsdl:operation name="TransactionComplete">
            <wsdl:input message="tns:TransactionCompleteRequest"/>
            <wsdl:output message="tns:TransactionCompleteResponse"/>
        </wsdl:operation>
        <wsdl:operation name="TransactionCompleteWithSou">
            <wsdl:input message="tns:TransactionCompleteWithSouRequest"/>
            <wsdl:output message="tns:TransactionCompleteWithSouResponse"/>
        </wsdl:operation>
        <wsdl:operation name="TransactionCancel">
            <wsdl:input message="tns:TransactionCancelRequest"/>
            <wsdl:output message="tns:TransactionCancelResponse"/>
        </wsdl:operation>
        <wsdl:operation name="TransactionRefund">
            <wsdl:input message="tns:TransactionRefundRequest"/>
            <wsdl:output message="tns:TransactionRefundResponse"/>
        </wsdl:operation>
        <wsdl:operation name="GetInvoiceUrl">
            <wsdl:input message="tns:GetInvoiceUrlRequest"/>
            <wsdl:output message="tns:GetInvoiceUrlResponse"/>
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="wsbBindingApi" type="tns:wsbPort">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="GetTransactionStatus">
            <wsdl:input message="tns:GetTransactionStatusRequest"></wsdl:input>
            <wsdl:output message="tns:GetTransactionStatusResponse"></wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="TransactionComplete">
            <wsdl:input message="tns:TransactionCompleteRequest"></wsdl:input>
            <wsdl:output message="tns:TransactionCompleteResponse"></wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="TransactionCompleteWithSou">
            <wsdl:input message="tns:TransactionCompleteWithSouRequest"></wsdl:input>
            <wsdl:output message="tns:TransactionCompleteWithSouResponse"></wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="TransactionCancel">
            <wsdl:input message="tns:TransactionCancelRequest"></wsdl:input>
            <wsdl:output message="tns:TransactionCancelResponse"></wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="TransactionRefund">
            <wsdl:input message="tns:TransactionRefundRequest"></wsdl:input>
            <wsdl:output message="tns:TransactionRefundResponse"></wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetInvoiceUrl">
            <wsdl:input message="tns:GetInvoiceUrlRequest"></wsdl:input>
            <wsdl:output message="tns:GetInvoiceUrlResponse"></wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="WSBApi">
        <wsdl:port name="wsbSOAP" binding="tns:wsbBindingApi">
            <soap:address location="https://sandbox.webpay.by/WSBApi"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>