Agency API. Payments

Материал из Центр поддержки системы бронировании
Версия от 14:27, 3 декабря 2014; Михаил Руденко (обсуждение | вклад) (Новая страница: «== Getting list of allowed payment gateways == WSDL is located on URL: http://CLIENT_DOMAIN/wsdev/wsdl.php?version=1.0&for=PaymentInitialization This query al…»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к навигации Перейти к поиску

Getting list of allowed payment gateways

WSDL is located on URL: http://CLIENT_DOMAIN/wsdev/wsdl.php?version=1.0&for=PaymentInitialization

This query allow to get list of payment gateways to pay specific order. For each gateway following parameters are retrieved:

  • Name of gateway
  • Payment charge that will be added to total price of an order
  • URL on which user have to be redirected to enter payment data on gateway side
  • Optional URL on which user is redirected after finish of payment.

Common request / response format

Request

 1 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://CLIENT_DOMAIN/wsdev/?version%3D1.0%26for%3DPaymentInitialization">
 2    <soapenv:Header/>
 3    <soapenv:Body>
 4       <ver:InitPayment>
 5          <RequestBin>
 6             <Request>
 7                <OrderId>?</OrderId>
 8                <!--OrderId — Id of booked order. Mandatory--> 
 9                <ReturnUrlToCatch>?</ReturnUrlToCatch>
10                <!--ReturnUrlToCatch - Indicate if it is needed to return URL address to which user will be redirected after payment.-->
11                <!--Optional:--> 
12             </Request>
13             <Source>
14                <ClientId>?</ClientId>
15                <!--ClientId — Client ID in Nemo. You can to see/add it Admin panel in section "Administration" - "Web service. Authorization". Mandatory--> 
16                <APIKey>?</APIKey>
17                <!--APIKey — Secret access key to Nemo API. You can to see/add it Admin panel in section "Administration" - "Web service. Authorization". Mandatory--> 
18                <Language>?</Language>
19                <!--Language — Example: RU--> 
20                <Currency>?</Currency>
21                <!-- Currency — Example: RUB, EUR--> 
22             </Source>
23          </RequestBin>
24       </ver:InitPayment>
25    </soapenv:Body>
26 </soapenv:Envelope>

Response

 1 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://CLIENT_DOMAIN/wsdev/?version%3D1.0%26for%3DPaymentInitialization">
 2    <SOAP-ENV:Body>
 3       <ns1:InitPaymentResponse>
 4          <ResponseBin>
 5             <Response>
 6                <Gateways>
 7                   <Gateway>
 8                      <GatewayName>?</GatewayName>
 9                      <!--GatewayName — Name of payment gateway. For example: Uniteller -->
10                      <PaymentCharge Currency="?">?</PaymentCharge>
11 	             <!--PaymentCharge — charge which have to be added to the total price. Currency — ISO Currency code, have to be the same as in the request.-->
12                      <RedirectUrl>?</RedirectUrl>
13                      <!--RedirectUrl — URL on which user is redirected to get on gateway payment page-->
14                      <UrlToCatch>?</UrlToCatch>
15 	             <!--UrlToCatch — URL on which user is redirected after payment finishing-->
16                   </Gateway>
17                </Gateways>
18             </Response>
19          </ResponseBin>
20       </ns1:InitPaymentResponse>
21    </SOAP-ENV:Body>
22 </SOAP-ENV:Envelope>

Samples of using

Request

 1 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://CLIENT_DOMAIN/wsdev/?version%3D1.0%26for%3DPaymentInitialization">
 2    <soapenv:Header/>
 3    <soapenv:Body>
 4       <ver:InitPayment>
 5          <RequestBin>
 6             <Request>
 7                <OrderId>276965</OrderId>
 8                <ReturnUrlToCatch>true</ReturnUrlToCatch>
 9             </Request>
10             <Source>
11                <ClientId>---</ClientId>
12                <APIKey>---</APIKey>
13                <Language>RU</Language>
14                <Currency>RUB</Currency>
15             </Source>
16          </RequestBin>
17       </ver:InitPayment>
18    </soapenv:Body>
19 </soapenv:Envelope>

Response

 1 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://CLIENT_DOMAIN/wsdev/?version%3D1.0%26for%3DPaymentInitialization">
 2    <SOAP-ENV:Body>
 3       <ns1:InitPaymentResponse>
 4          <ResponseBin>
 5             <Response>
 6                <Gateways>
 7                   <Gateway>
 8                      <GatewayName>Uniteller</GatewayName>
 9                      <PaymentCharge Currency="RUB">81.54</PaymentCharge>
10                      <RedirectUrl>http://CLIENT_DOMAIN/payment__select_outside?booking_id=276965&amp;one_time_booking_code=PZ7981&amp;method=27</RedirectUrl>
11                      <!--Пример ссылки-->
12                      <UrlToCatch>http://CLIENT_DOMAIN/poffice__bookinfo?&amp;booking_id=276965</UrlToCatch>
13                      <!--Пример ссылки-->
14                   </Gateway>
15                </Gateways>
16             </Response>
17          </ResponseBin>
18       </ns1:InitPaymentResponse>
19    </SOAP-ENV:Body>
20 </SOAP-ENV:Envelope>

См. также