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

Изменения

Agency API. Payments

6589 байт добавлено, 15:51, 4 декабря 2018
м
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 allows to get a list of payment gateways to pay for a specific order.
For each gateway following parameters are retrieved:
* ID of the payment method* Name of the gateway* Payment charge that will be added to the total price of an the order* URL on which user have to be redirected to enter payment data on the gateway side* Optional URL on which user is redirected after finish of the paymentis finished.
== Common request / response format ==
<Gateway>
<PaymentMethodId>?</PaymentMethodId>
<!--PaymentMethodId - ID of the payment method. This parameter should can be used in the SelectPayment request. -->
<GatewayName>?</GatewayName>
<!--GatewayName — Name of payment gateway. For example: Uniteller -->
<Gateways>
<Gateway>
<PaymentMethodId>1075</PaymentMethodId>
<GatewayName>Uniteller</GatewayName>
<PaymentCharge Currency="RUB">81.54</PaymentCharge>
<UrlToCatch>http://CLIENT_DOMAIN/poffice__bookinfo?&amp;booking_id=276965</UrlToCatch>
<!--Пример ссылки-->
</Gateway>
<Gateway>
<PaymentMethodId>1079</PaymentMethodId>
<GatewayName>Rapida</GatewayName>
<PaymentCharge Currency="RUB">123</PaymentCharge>
<RedirectUrl/>
<UrlToCatch xsi:nil="true"/>
</Gateway>
</Gateways>
</ResponseBin>
</ns1:InitPaymentResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</syntaxhighlight>
</div>
</div>
 
'''Note: if the ''<RedirectUrl/>'' tag is empty, the ''SelectPayment'' method should be used.'''
 
== Selecting a payment method ==
 
WSDL is located on URL: http://CLIENT_DOMAIN/wsdev/wsdl.php?version=1.0&for=SelectPayment
 
This query allows to select a specific payment method. Currently it is available for Rapida gateway.
 
== 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%3DSelectPayment">
<soapenv:Header/>
<soapenv:Body>
<ver:SelectPayment>
<RequestBin>
<Request>
<OrderId>?</OrderId>
<!--OrderId — Id of booked order. Mandatory-->
<PaymentMethodId>?</PaymentMethodId>
<!--PaymentMethodId - ID of the payment method. This parameter can be taken from the PaymentInitialization response. Mandatory-->
</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:SelectPayment>
</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%3DSelectPayment">
<SOAP-ENV:Body>
<ns1:SelectPaymentResponse>
<ResponseBin>
<Response>
<TransactionId>?</TransactionId>
<!--TransactionId - ID of the payment transaction in the Nemo system-->
<PaymentParameters>
<PaymentParameter>
<Key>Code</Key>
<Value>?</Value>
<!--Value - payment code number. It is returned by the payment gateway.-->
</PaymentParameter>
<PaymentParameter>
<Key>Timelimit</Key>
<Value>?</Value>
<!--Value - payment time limit for the order-->
</PaymentParameter>
<PaymentParameter>
<Key>Description</Key>
<Value>?</Value>
<!--Value - a brief description for the client. It may contain the timelimit, payment code or some other information. Can be changed in the payment gateway settings in the Nemo system-->
</PaymentParameter>
</PaymentParameters>
</Response>
</ResponseBin>
</ns1:SelectPaymentResponse>
</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%3DSelectPayment">
<soapenv:Header/>
<soapenv:Body>
<ver:SelectPayment>
<RequestBin>
<Request>
<OrderId>279712</OrderId>
<PaymentMethodId>1079</PaymentMethodId>
</Request>
<Source>
<ClientId>--</ClientId>
<APIKey>--</APIKey>
<Language>RU</Language>
<Currency>RUB</Currency>
</Source>
</RequestBin>
</ver:SelectPayment>
</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%3DSelectPayment">
<SOAP-ENV:Body>
<ns1:SelectPaymentResponse>
<ResponseBin>
<Response>
<TransactionId>117608085</TransactionId>
<PaymentParameters>
<PaymentParameter>
<Key>Code</Key>
<Value>a117608085a0CGN73</Value>
</PaymentParameter>
<PaymentParameter>
<Key>Timelimit</Key>
<Value>23:59 20.01.2015</Value>
</PaymentParameter>
<PaymentParameter>
<Key>Description</Key>
<Value>Your payment code is a117608085a0CGN73. You have to pay the order until 23:59 20.01.2015</Value>
</PaymentParameter>
</PaymentParameters>
</Response>
</ResponseBin>
</ns1:SelectPaymentResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
== См. также ==
*[[Агентский АПИAPI Авиабилеты]]*[[Nemo web services payment integration for mobile apps]] [[Категория:Агентский API]][[Категория:English]]
1382
правки
'