<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<wsdl:definitions
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://zarinpal.com/"
    targetNamespace="http://zarinpal.com/"
    name="PaymentGatewayImplementationService">
    <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://zarinpal.com/">
            <s:element name="PaymentRequest">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="MerchantID" type="s:string"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Amount" type="s:int"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Description" type="s:string"/>
                        <s:element minOccurs="0" maxOccurs="1" name="Email" type="s:string" nillable="true"/>
                        <s:element minOccurs="0" maxOccurs="1" name="Mobile" type="s:string" nillable="true"/>
                        <s:element minOccurs="1" maxOccurs="1" name="CallbackURL" type="s:string"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="PaymentRequestResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:int"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Authority" type="s:string"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="PaymentRequestWithExtra">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="MerchantID" type="s:string"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Amount" type="s:int"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Description" type="s:string"/>
                        <s:element minOccurs="1" maxOccurs="1" name="AdditionalData" type="s:string"/>
                        <s:element minOccurs="0" maxOccurs="1" name="Email" type="s:string" nillable="true"/>
                        <s:element minOccurs="0" maxOccurs="1" name="Mobile" type="s:string" nillable="true"/>
                        <s:element minOccurs="1" maxOccurs="1" name="CallbackURL" type="s:string"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="PaymentRequestWithExtraResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:int"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Authority" type="s:string"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="PaymentVerification">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="MerchantID" type="s:string"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Authority" type="s:string"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Amount" type="s:int"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="PaymentVerificationResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:int"/>
                        <s:element minOccurs="1" maxOccurs="1" name="RefID" type="s:long"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="PaymentVerificationWithExtra">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="MerchantID" type="s:string"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Authority" type="s:string"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Amount" type="s:int"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="PaymentVerificationWithExtraResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:int"/>
                        <s:element minOccurs="1" maxOccurs="1" name="RefID" type="s:long"/>
                        <s:element minOccurs="1" maxOccurs="1" name="ExtraDetail" type="s:string"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetUnverifiedTransactions">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="MerchantID" type="s:string"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetUnverifiedTransactionsResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:int"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Authorities" type="s:string"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="RefreshAuthority">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="MerchantID" type="s:string"/>
                        <s:element minOccurs="1" maxOccurs="1" name="Authority" type="s:string"/>
                        <s:element minOccurs="1" maxOccurs="1" name="ExpireIn" type="s:int"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="RefreshAuthorityResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:int"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
        </s:schema>
    </wsdl:types>

    <wsdl:message name="PaymentRequestSoapIn">
        <wsdl:part name="parameters" element="tns:PaymentRequest"/>
    </wsdl:message>
    <wsdl:message name="PaymentRequestSoapOut">
        <wsdl:part name="parameters" element="tns:PaymentRequestResponse"/>
    </wsdl:message>

    <wsdl:message name="PaymentRequestWithExtraSoapIn">
        <wsdl:part name="parameters" element="tns:PaymentRequestWithExtra"/>
    </wsdl:message>
    <wsdl:message name="PaymentRequestWithExtraSoapOut">
        <wsdl:part name="parameters" element="tns:PaymentRequestWithExtraResponse"/>
    </wsdl:message>

    <wsdl:message name="PaymentVerificationSoapIn">
        <wsdl:part name="parameters" element="tns:PaymentVerification"/>
    </wsdl:message>
    <wsdl:message name="PaymentVerificationSoapOut">
        <wsdl:part name="parameters" element="tns:PaymentVerificationResponse"/>
    </wsdl:message>

    <wsdl:message name="PaymentVerificationWithExtraSoapIn">
        <wsdl:part name="parameters" element="tns:PaymentVerificationWithExtra"/>
    </wsdl:message>
    <wsdl:message name="PaymentVerificationWithExtraSoapOut">
        <wsdl:part name="parameters" element="tns:PaymentVerificationWithExtraResponse"/>
    </wsdl:message>

    <wsdl:message name="GetUnverifiedTransactionsSoapIn">
        <wsdl:part name="parameters" element="tns:GetUnverifiedTransactions"/>
    </wsdl:message>
    <wsdl:message name="GetUnverifiedTransactionsSoapOut">
        <wsdl:part name="parameters" element="tns:GetUnverifiedTransactionsResponse"/>
    </wsdl:message>

    <wsdl:message name="RefreshAuthoritySoapIn">
        <wsdl:part name="parameters" element="tns:RefreshAuthority"/>
    </wsdl:message>
    <wsdl:message name="RefreshAuthoritySoapOut">
        <wsdl:part name="parameters" element="tns:RefreshAuthorityResponse"/>
    </wsdl:message>

    <wsdl:portType name="PaymentGatewayImplementationServicePortType">
        <wsdl:operation name="PaymentRequest">
            <wsdl:input message="tns:PaymentRequestSoapIn"/>
            <wsdl:output message="tns:PaymentRequestSoapOut"/>
        </wsdl:operation>
        <wsdl:operation name="PaymentRequestWithExtra">
            <wsdl:input message="tns:PaymentRequestWithExtraSoapIn"/>
            <wsdl:output message="tns:PaymentRequestWithExtraSoapOut"/>
        </wsdl:operation>
        <wsdl:operation name="PaymentVerification">
            <wsdl:input message="tns:PaymentVerificationSoapIn"/>
            <wsdl:output message="tns:PaymentVerificationSoapOut"/>
        </wsdl:operation>
        <wsdl:operation name="PaymentVerificationWithExtra">
            <wsdl:input message="tns:PaymentVerificationWithExtraSoapIn"/>
            <wsdl:output message="tns:PaymentVerificationWithExtraSoapOut"/>
        </wsdl:operation>
        <wsdl:operation name="GetUnverifiedTransactions">
            <wsdl:input message="tns:GetUnverifiedTransactionsSoapIn"/>
            <wsdl:output message="tns:GetUnverifiedTransactionsSoapOut"/>
        </wsdl:operation>
        <wsdl:operation name="RefreshAuthority">
            <wsdl:input message="tns:RefreshAuthoritySoapIn"/>
            <wsdl:output message="tns:RefreshAuthoritySoapOut"/>
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="PaymentGatewayImplementationServiceBinding"
                  type="tns:PaymentGatewayImplementationServicePortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="PaymentRequest">
            <soap:operation soapAction="#PaymentRequest" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:documentation>Payment request session creation should be done by using this method.
            </wsdl:documentation>
        </wsdl:operation>
        <wsdl:operation name="PaymentRequestWithExtra">
            <soap:operation soapAction="#PaymentRequestWithExtra" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:documentation>Payment request session creation with additional data like wages and more should be done
                by using this method.
            </wsdl:documentation>
        </wsdl:operation>
        <wsdl:operation name="PaymentVerification">
            <soap:operation soapAction="#PaymentVerification" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:documentation>Payment verification should be done by using this method.</wsdl:documentation>
        </wsdl:operation>
        <wsdl:operation name="PaymentVerificationWithExtra">
            <soap:operation soapAction="#PaymentVerificationWithExtra" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:documentation>Payment verification with additional data should be done by using this method.
            </wsdl:documentation>
        </wsdl:operation>
        <wsdl:operation name="GetUnverifiedTransactions">
            <soap:operation soapAction="#GetUnverifiedTransactions" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:documentation>Get a limited list of unverified transactions and their amounts.</wsdl:documentation>
        </wsdl:operation>
        <wsdl:operation name="RefreshAuthority">
            <soap:operation soapAction="#RefreshAuthority" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:documentation>By using this method you can refresh the authority to the needed valid time.
            </wsdl:documentation>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="PaymentGatewayImplementationService">
        <wsdl:port name="PaymentGatewayImplementationServicePort"
                   binding="tns:PaymentGatewayImplementationServiceBinding">
            <soap:address location="https://payment.zarinpal.com/pg/v4/soap/services/WebGate/service"/>
        </wsdl:port>
    </wsdl:service>

</wsdl:definitions>
