Протокол взаимодействия VPOS

Версия 1.1.0.1

Login

Операцияавторизациинасервере.

userName–логин пользователя привязанный к сертификату

password – парольпользователя

clientVersion – необязательныйпараметр. ВерсияклиентскогоПО.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<Login xmlns="

<userNamestring</userName

<password>string</password>

<clientVersionstring</clientVersion

</Login>

</soap:Body

</soap:Envelope

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<LoginResponsexmlns="

<LoginResult

<SessionIdstring</SessionId

<UserNamestring</UserName

<IsTempstring</IsTemp

<ServerVersionstring</ServerVersion

<EMailstring</EMail

</LoginResult

</LoginResponse

</soap:Body

</soap:Envelope

SOAP 1.2

The following is a sample SOAP 1.2 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<Login xmlns="

<userNamestring</userName

<password>string</password>

<clientVersionstring</clientVersion

</Login>

</soap12:Body

</soap12:Envelope

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<LoginResponsexmlns="

<LoginResult

<SessionIdstring</SessionId

<UserNamestring</UserName

<IsTempstring</IsTemp

<ServerVersionstring</ServerVersion

<EMailstring</EMail

</LoginResult

</LoginResponse

</soap12:Body

</soap12:Envelope

CreateOperationContext

Созданиеновойоперации.

sessionId – Idсессии, установленной при вызове метода Login

SOAP 1.1

The following is a sample SOAP 1.1 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<CreateOperationContextxmlns="

<sessionIdstring</sessionId

</CreateOperationContext

</soap:Body

</soap:Envelope

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<CreateOperationContextResponsexmlns=" />

</soap:Body

</soap:Envelope

SOAP 1.2

The following is a sample SOAP 1.2 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<CreateOperationContextxmlns="

sessionIdstring</sessionId

</CreateOperationContext

</soap12:Body

</soap12:Envelope

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<CreateOperationContextResponsexmlns=" />

</soap12:Body

</soap12:Envelope

SetTrackData

Назначениеномеракарты

SessionId – идентификаторсессииустановленнойпривызовеметодаLogin

trackData – номер карты или трек карты

SOAP 1.1

The following is a sample SOAP 1.1 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<SetTrackDataxmlns="

<sessionIdstring</sessionId

<trackDatastring</trackData

</SetTrackData

</soap:Body

</soap:Envelope

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<SetTrackDataResponsexmlns=" />

</soap:Body

</soap:Envelope

SOAP 1.2

The following is a sample SOAP 1.2 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<SetTrackDataxmlns="

<sessionIdstring</sessionId

<trackDatastring</trackData

</SetTrackData

</soap12:Body

</soap12:Envelope

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<SetTrackDataResponsexmlns=" />

</soap12:Body>

</soap12:Envelope>

SetTerminal

Назначение номера устройства для выполнения запроса

sessionId – IDсессии при вызове метода Login

sysId – Идентификаторплатежнойсистемы. Зависитоткарточногопродукта.

acqId – номер эквайера

trmId – номер терминала

SOAP 1.1

The following is a sample SOAP 1.1 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<SetTerminalxmlns="

<sessionIdstring</sessionId

<sysIdstring</sysId

<acqIddecimal</acqId

<trmIdstring</trmId

</SetTerminal

</soap:Body

</soap:Envelope

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<SetTerminalResponsexmlns=" />

</soap:Body

</soap:Envelope

SOAP 1.2

The following is a sample SOAP 1.2 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<SetTerminalxmlns="

<sessionIdstring</sessionId

<sysIdstring</sysId

<acqIddecimal</acqId

<trmIdstring</trmId

</SetTerminal

</soap12:Body

</soap12:Envelope

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<SetTerminalResponsexmlns=" />

</soap12:Body

</soap12:Envelope

Query

Запросна проведение операции. Возвращает список доступных операций для пользователя сессии.

SessionId – идентификаторсессииустановленнойпривызовеметодаLogin

SOAP 1.1

The following is a sample SOAP 1.1 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "

<?xmlversion="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<Query xmlns="

<sessionIdstring</sessionId

</Query>

</soap:Body

</soap:Envelope

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

soap:Body

<QueryResponsexmlns="

QueryResult

<TrackDatastring</TrackData

<NCardstring</NCard

<CardTypeBonus or Discount or Gift or Rucard</CardType

<Terminal>

<Acq_Member_Iddecimal</Acq_Member_Id

<Sys_Idstring</Sys_Id

<Acq_Iddecimal</Acq_Id

<Acq_Namestring</Acq_Name

<Trm_Idstring</Trm_Id

<Caid_Namestring</Caid_Name

<Address>string</Address>

</Terminal>

<Operations>

<OperationType

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</OperationType

<OperationType

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</OperationType

</Operations>

<Operation>

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</Operation>

<STAN>string</STAN>

<AuthCodestring</AuthCode

<Amount>decimal</Amount>

<CurrCodestring</CurrCode

<DateOperdateTime</DateOper

<ErrorTextstring</ErrorText

<ReceiptUristring</ReceiptUri

<QueryValuesStringstring</QueryValuesString

<OperationValuesStringstring</OperationValuesString

</QueryResult

</QueryResponse

</soap:Body

</soap:Envelope

SOAP 1.2

The following is a sample SOAP 1.2 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<Query xmlns="

<sessionIdstring</sessionId

</Query>

</soap12:Body

</soap12:Envelope

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<QueryResponsexmlns="

<QueryResult

<TrackDatastring</TrackData

<NCardstring</NCard

<CardTypeBonus or Discount or Gift or Rucard</CardType

<Terminal>

<Acq_Member_Iddecimal</Acq_Member_Id

<Sys_Idstring</Sys_Id

<Acq_Iddecimal</Acq_Id

<Acq_Namestring</Acq_Name

<Trm_Idstring</Trm_Id

<Caid_Namestring</Caid_Name

<Address>string</Address>

</Terminal>

<Operations>

<OperationType

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</OperationType

<OperationType

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</OperationType

</Operations>

<Operation>

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</Operation>

<STAN>string</STAN>

<AuthCodestring</AuthCode

<Amount>decimal</Amount>

<CurrCodestring</CurrCode

<DateOperdateTime</DateOper

<ErrorTextstring</ErrorText

<ReceiptUristring</ReceiptUri

<QueryValuesStringstring</QueryValuesString

<OperationValuesStringstring</OperationValuesString

</QueryResult

</QueryResponse

</soap12:Body

</soap12:Envelope

SetOperationParams

Назначенияпараметровоперации

SessionId – идентификатор сессии установленной при вызове метода Login

operType – Тип операции. Принимаемые значения(трехбуквенный код):

LIM, "Запрос остатка"

SAL, "Учет покупки"

DEP, "Пополнение"

PAY, "Оплата"

CAN, "Отмена"

RET, "Возврат"

amount – сумма операции в рублях, разделитель копеек “.”

currCode – Код валюты. 810 – рубли, 500 - бонусы

SOAP 1.1

The following is a sample SOAP 1.1 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<SetOperationParamsxmlns="

<sessionIdstring</sessionId

<operTypestring</operType

<amount>decimal</amount>

<currCodestring</currCode

</SetOperationParams

</soap:Body

</soap:Envelope

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<SetOperationParamsResponsexmlns=" />

</soap:Body

</soap:Envelope

SOAP 1.2

The following is a sample SOAP 1.2 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<SetOperationParamsxmlns="

<sessionIdstring</sessionId

<operTypestring</operType

<amount>decimal</amount>

<currCodestring</currCode

</SetOperationParams

</soap12:Body

</soap12:Envelope

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<SetOperationParamsResponsexmlns=" />

</soap12:Body

</soap12:Envelope

Execute

Выполнение запроса, по заданным выше параметрам

SessionId – идентификатор сессии установленной при вызове метода Login

SOAP 1.1

The following is a sample SOAP 1.1 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<Execute xmlns="

<sessionIdstring</sessionId

</Execute>

</soap:Body

</soap:Envelope

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<ExecuteResponsexmlns="

<ExecuteResult

<TrackDatastring</TrackData

<NCardstring</NCard

<CardTypeBonus or Discount or Gift or Rucard</CardType

<Terminal>

<Acq_Member_Iddecimal</Acq_Member_Id

<Sys_Idstring</Sys_Id

<Acq_Iddecimal</Acq_Id

<Acq_Namestring</Acq_Name

<Trm_Idstring</Trm_Id

<Caid_Namestring</Caid_Name

<Address>string</Address>

</Terminal>

<Operations>

<OperationType

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</OperationType

<OperationType

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</OperationType

</Operations>

<Operation>

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</Operation>

<STAN>string</STAN>

<AuthCodestring</AuthCode

<Amount>decimal</Amount>

<CurrCodestring</CurrCode

<DateOperdateTime</DateOper

ErrorTextstring</ErrorText

<ReceiptUristring</ReceiptUri

<QueryValuesStringstring</QueryValuesString

OperationValuesStringstring</OperationValuesString

</ExecuteResult

</ExecuteResponse

</soap:Body

</soap:Envelope

SOAP 1.2

The following is a sample SOAP 1.2 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<Execute xmlns="

<sessionIdstring</sessionId

</Execute>

</soap12:Body

</soap12:Envelope

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<ExecuteResponsexmlns="

ExecuteResult

<TrackDatastring</TrackData

<NCardstring</NCard

<CardTypeBonus or Discount or Gift or Rucard</CardType

<Terminal>

<Acq_Member_Iddecimal</Acq_Member_Id

<Sys_Idstring</Sys_Id

<Acq_Iddecimal</Acq_Id

<Acq_Namestring</Acq_Name

<Trm_Idstring</Trm_Id

<Caid_Namestring</Caid_Name

<Address>string</Address>

</Terminal>

<Operations>

<OperationType

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</OperationType

<OperationType

OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</OperationType

</Operations>

<Operation>

<OperTypestring</OperType

<Description>string</Description>

<HotKeystring</HotKey

</Operation>

<STAN>string</STAN>

<AuthCodestring</AuthCode

<Amount>decimal</Amount>

<CurrCodestring</CurrCode

<DateOperdateTime</DateOper

<ErrorTextstring</ErrorText

<ReceiptUristring</ReceiptUri

<QueryValuesStringstring</QueryValuesString

<OperationValuesStringstring</OperationValuesString

</ExecuteResult

</ExecuteResponse

</soap12:Body

</soap12:Envelope

Logout

Выходизсистемысзакрытиемсессии.

SessionId – идентификатор сессии установленной при вызове метода Login

SOAP 1.1

The following is a sample SOAP 1.1 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<Logout xmlns="

<sessionIdstring</sessionId

</Logout>

</soap:Body

</soap:Envelope

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

soap:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap="

<soap:Body

<LogoutResponsexmlns=" />

</soap:Body

</soap:Envelope

SOAP 1.2

The following is a sample SOAP 1.2 request and response. Theplaceholdersshown need to be replaced with actual values.

POST /vpos/virtualposservice.asmx HTTP/1.1

Host: loyalty.rucard.net

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<Logout xmlns="

<sessionIdstring</sessionId

</Logout>

</soap12:Body

</soap12:Envelope

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelopexmlns:xsi=" xmlns:xsd=" xmlns:soap12="

<soap12:Body

<LogoutResponsexmlns=" />

</soap12:Body>

</soap12:Envelope>