1206
правок
Изменения
Перейти к навигации
Перейти к поиску
→Проверка в сторонней системе возможности тикетинга
==Проверка в сторонней системе возможности тикетинга==
При выписки билета через стороннюю систему 1С, отправляется запрос "GetDebtCounterparty", который спрашивает, можно ли с счета в 1С списать средства для оплаты. В ответе содержится заключение от 1С, в случае если ошибок нет, в ответе будет
<pre><m:Opportunity>Да</m:Opportunity></pre>
Пример запроса "GetDebtCounterparty"
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://psw1c01.office.pegastour.ru/avia">
<SOAP-ENV:Body>
<ns1:GetDebtCounterparty>
<ns1:ExternalUserId>00017483</ns1:ExternalUserId>
<ns1:ExternalPaymentId>00234031</ns1:ExternalPaymentId>
<ns1:BaseFare>2490</ns1:BaseFare>
<ns1:Tax>643</ns1:Tax>
<ns1:ValVendorCommission>49.8</ns1:ValVendorCommission>
<ns1:Locator>0X97T6</ns1:Locator>
<ns1:Discount>0</ns1:Discount>
<ns1:Charge>0</ns1:Charge>
<ns1:Sum>3133</ns1:Sum>
<ns1:TotalPrice>3658.1</ns1:TotalPrice>
<ns1:GDSCurrency>RUB</ns1:GDSCurrency>
<ns1:OrderCurrency>RUB</ns1:OrderCurrency>
<ns1:OrderCurrencyRate>1</ns1:OrderCurrencyRate>
<ns1:beginDate>2014-08-30T11:05:00</ns1:beginDate>
</ns1:GetDebtCounterparty>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</pre>
Пример ответа "GetDebtCounterparty"
<pre>
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<m:GetDebtCounterpartyResponse xmlns:m="http://psw1c01.office.pegastour.ru/avia">
<m:return xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="m:AnswerDebt">
<m:Opportunity>Да</m:Opportunity>
<m:Message1/>
</m:return>
</m:GetDebtCounterpartyResponse>
</soap:Body>
</soap:Envelope>
</pre>
==API загрузки счетов из сторонней системы==