Открыть главное меню

Изменения

Agency API. Payments

6048 байт добавлено, 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 ==

<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">
==== Request ====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://CLIENT_DOMAIN/wsdev/?version%3D1.0%26for%3DPaymentInitialization">
<soapenv:Header/>
<soapenv:Body>
<ver:InitPayment>
<RequestBin>
<Request>
<OrderId>?</OrderId>
<!--OrderId — Id of booked order. Mandatory-->
<ReturnUrlToCatch>?</ReturnUrlToCatch>
<!--ReturnUrlToCatch - Indicate if it is needed to return URL address to which user will be redirected after payment.-->
<!--Optional:-->
</Request>
<Source>
<ClientId>?</ClientId>
<!--ClientId — Client ID in Nemo. You can to see/add it Admin panel in section "Administration" - "Web service. Authorization". Mandatory-->
<APIKey>?</APIKey>
<!--APIKey — Secret access key to Nemo API. You can to see/add it Admin panel in section "Administration" - "Web service. Authorization". Mandatory-->
<Language>?</Language>
<!--Language — Example: RU-->
<Currency>?</Currency>
<!-- Currency — Example: RUB, EUR-->
</Source>
</RequestBin>
</ver:InitPayment>
</soapenv:Body>
</soapenv:Envelope>
</syntaxhighlight>
</div>
</div>

<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">

==== Response ====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://CLIENT_DOMAIN/wsdev/?version%3D1.0%26for%3DPaymentInitialization">
<SOAP-ENV:Body>
<ns1:InitPaymentResponse>
<ResponseBin>
<Response>
<Gateways>
<Gateway>
<GatewayName>?</GatewayName>
<!--GatewayName — Name of payment gateway. For example: Uniteller -->
<PaymentCharge Currency="?">?</PaymentCharge>
<!--PaymentCharge — charge which have to be added to the total price. Currency — ISO Currency code, have to be the same as in the request.-->
<RedirectUrl>?</RedirectUrl>
<!--RedirectUrl — URL on which user is redirected to get on gateway payment page-->
<UrlToCatch>?</UrlToCatch>
<!--UrlToCatch — URL on which user is redirected after payment finishing-->
</Gateway>
</Gateways>
</Response>
</ResponseBin>
</ns1:InitPaymentResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</syntaxhighlight>
</div>
</div>

== Samples of using ==

<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">
==== Request ====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://CLIENT_DOMAIN/wsdev/?version%3D1.0%26for%3DPaymentInitialization">
<soapenv:Header/>
<soapenv:Body>
<ver:InitPayment>
<RequestBin>
<Request>
<OrderId>276965</OrderId>
<ReturnUrlToCatch>true</ReturnUrlToCatch>
</Request>
<Source>
<ClientId>---</ClientId>
<APIKey>---</APIKey>
<Language>RU</Language>
<Currency>RUB</Currency>
</Source>
</RequestBin>
</ver:InitPayment>
</soapenv:Body>
</soapenv:Envelope>
</syntaxhighlight>
</div>
</div>

<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">

==== Response ====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://CLIENT_DOMAIN/wsdev/?version%3D1.0%26for%3DPaymentInitialization">
<SOAP-ENV:Body>
<ns1:InitPaymentResponse>
<ResponseBin>
<Response>
<Gateways>
<Gateway>
<GatewayName>Uniteller</GatewayName>
<PaymentCharge Currency="RUB">81.54</PaymentCharge>
<RedirectUrl>http://CLIENT_DOMAIN/payment__select_outside?booking_id=276965&amp;one_time_booking_code=PZ7981&amp;method=27</RedirectUrl>
<!--Пример ссылки-->
<UrlToCatch>http://CLIENT_DOMAIN/poffice__bookinfo?&amp;booking_id=276965</UrlToCatch>
<!--Пример ссылки-->
</Gateway>
</Gateways>
</Response>
</ResponseBin>
</ns1:InitPaymentResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</syntaxhighlight>
</div>
</div>

== См. также ==

*[[Агентский АПИ]]
'