๐ Home > ๐ฆ TaskService > ๐ TrustSetConfirm
TrustSetConfirm
Description
confirmation of the request to set up trust via X21 PurseID: request number from TrustSetRequest ClientConfirmCode: code from the client err: execution result (https://wiki.webmoney.ru/projects/webmoney/wiki/interfeys_x21) signature string: string.Format("{0};{1};{2}", PurseID, ClientConfirmCode, Secret)
Method Signature
public Int32 TrustSetConfirm(
String ServiceName,
String Sign,
Int32 PurseID,
String ClientConfirmCode,
String sLang,
out String SlavePurse,
out String SlaveWMID,
out String MasterWMID,
out stX21Error err
)
Parameters
ServiceName
- Type:
String - Direction: input
Sign
- Type:
String - Direction: input
PurseID
- Type:
Int32 - Direction: input
ClientConfirmCode
- Type:
String - Direction: input
sLang
- Type:
String - Direction: input
SlavePurse
- Type:
String - Direction: output
SlaveWMID
- Type:
String - Direction: output
MasterWMID
- Type:
String - Direction: output
err
- Type:
stX21Error - Direction: output
- Details: See stX21Error type definition
Return Value
- Type:
Int32
Authentication
This method requires authentication signature.
Signature String Format
string.Format("{0};{1};{2}", PurseID, ClientConfirmCode, Secret)
SOAP Request Example
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<TrustSetConfirm xmlns="http://mentor.web.money/taskservice">
<ServiceName>ServiceName</ServiceName>
<Sign>base64signature</Sign>
<PurseID>123</PurseID>
<ClientConfirmCode>string_value</ClientConfirmCode>
<sLang>string_value</sLang>
</TrustSetConfirm>
</soap:Body>
</soap:Envelope>
SOAP Response Example
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<TrustSetConfirmResponse xmlns="http://tempuri.org/">
<TrustSetConfirmResult>123</TrustSetConfirmResult>
<SlavePurse>R000000000000</SlavePurse>
<SlaveWMID>123456789012</SlaveWMID>
<MasterWMID>123456789012</MasterWMID>
<err><!-- stX21Error object --></err>
</TrustSetConfirmResponse>
</soap:Body>
</soap:Envelope>
Code Examples
C# Example
var client = new TaskService();
String ServiceName = "sample string";
String Sign = "base64signature";
Int32 PurseID = 123;
String ClientConfirmCode = "sample string";
String sLang = "sample string";
String SlavePurse;
String SlaveWMID;
String MasterWMID;
stX21Error err;
var result = client.TrustSetConfirm(ServiceName, Sign, PurseID, ClientConfirmCode, sLang, out SlavePurse, out SlaveWMID, out MasterWMID, out err);
Python Example (using zeep)
from zeep import Client
client = Client('https://your-service.com/TaskService.asmx?WSDL')
# Prepare parameters
ServiceName = 'sample string'
Sign = 'base64signature'
PurseID = 123
ClientConfirmCode = 'sample string'
sLang = 'sample string'
result = client.service.TrustSetConfirm(ServiceName, Sign, PurseID, ClientConfirmCode, sLang)
print(result)
JavaScript Example (using axios)
const axios = require('axios');
const soapRequest = `
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<TrustSetConfirm xmlns="http://mentor.web.money/taskservice">
<ServiceName>${ServiceName}</ServiceName>
<Sign>${Sign}</Sign>
<PurseID>${PurseID}</PurseID>
<ClientConfirmCode>${ClientConfirmCode}</ClientConfirmCode>
<sLang>${sLang}</sLang>
</TrustSetConfirm>
</soap:Body>
</soap:Envelope>`;
async function call() {
const response = await axios.post(
'https://mentor.web.moneyTaskService.asmx',
soapRequest,
{
headers: {
'Content-Type': 'text/xml; charset=utf-8',
'SOAPAction': '"http://mentor.web.money/taskservice/TrustSetConfirm"'
}
}
);
console.log(response.data);
}
call().catch(console.error);
Related Topics
- Service Overview - All TaskService methods
Navigation
โฌ๏ธ Back to TaskService | ๐ Documentation Home | ๐ป Code Examples