-
Notifications
You must be signed in to change notification settings - Fork 0
Запрос статуса
magzhan.karasayev edited this page Aug 8, 2018
·
1 revision
FIXME: add more stuff
Запрос:
# request
#!/bin/bash
curl -XPOST -H "Content-Type: text/xml;charset=UTF-8" -d'@getTransactionRequest.xml' 'http://127.0.0.1:8080/mfs-public-soap/transaction-management'
Пример XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tran="http://www.allpay.kz/mfs/soap/TransactionManagement" xmlns:xd="http://www.w3.org/2000/09/xmldsig">
<soapenv:Header/>
<soapenv:Body>
<tran:getTransaction>
<!--Optional:-->
<GetTransactionRequest>
<!--Optional:-->
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
<Reference URI="">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>gcdN8F5281ca1bsvuwVO93ZNKSc=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>EbEv86Ugl7kwNrxRQZ3P6k/luHcERKstWZcVNQN9ZMc4un3zOM6m/Q==</SignatureValue>
<KeyInfo>
<KeyValue>
<DSAKeyValue>
<P>/X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA
HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu
K2HXKu/yIgMZndFIAcc=
</P>
<Q>l2BQjxUjC8yykrmCouuEC/BYHPU=</Q>
<G>9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3
zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL
Zl6Ae1UlZAFMO/7PSSo=
</G>
<Y>7MHcj1nEytl2jHY2ymbbNGOcKs6lYxLi5PPd7C/y3drRRTd6nshekxtBK6F4tyxn9aioVufeqHTS
P46TQe6Qc4tm1OmkxB4/JS1ZrQb18Spem/wa0UR+z7HjwwKTPExTiuyVOgZUO01OufCd00x/lT3h
NxceIz2AmxQ8L8pKanY=
</Y>
</DSAKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
<transactionNumber>1</transactionNumber>
</GetTransactionRequest>
</tran:getTransaction>
</soapenv:Body>
</soapenv:Envelope>
Ответ будет следующим:
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header></env:Header>
<env:Body>
<ns3:getTransactionResponse xmlns:ns2="http://www.w3.org/2000/09/xmldsig"
xmlns:ns3="http://www.allpay.kz/mfs/soap/TransactionManagement">
<return>
<errorInfo>OK</errorInfo>
<result>
<amount>1</amount>
<blocked>false</blocked>
<fromAccountNumber>fromAcc</fromAccountNumber>
<fromUserLoginName>fromUser</fromUserLoginName>
<status>COMPLETED</status>
<toAccountNumber>toAcc</toAccountNumber>
<toUserLoginName>toUser</toUserLoginName>
<transactionNumber>31337</transactionNumber>
</result>
</return>
</ns3:getTransactionResponse>
</env:Body>
</env:Envelope>
описание полей:
<amount>1</amount> - сумма перевода
<blocked>false</blocked> - заблокирована ли сумма у отправителя
<fromAccountNumber>fromAcc</fromAccountNumber> - номер счета отправителя
<fromUserLoginName>fromUser</fromUserLoginName> - логин(номер телефона) отправителя
<status>COMPLETED</status> - статус транзакции
<toAccountNumber>toAcc</toAccountNumber> - номер счета получателя
<toUserLoginName>toUser</toUserLoginName> - логин(номер телефона) получателя
<transactionNumber>31337</transactionNumber> - номер транзакции в системе allpay
Запрос:
# request
#!/bin/bash
curl -XPOST -H "Content-Type: text/xml;charset=UTF-8" -d'@completeTransactionRequest.xml' 'http://127.0.0.1:8080/mfs-public-soap/transaction-management'
Пример XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tran="http://www.allpay.kz/mfs/soap/TransactionManagement" xmlns:xd="http://www.w3.org/2000/09/xmldsig">
<soapenv:Header/>
<soapenv:Body>
<tran:completeTransaction>
<!--Optional:-->
<CompleteTransactionRequest>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
<Reference URI="">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>gcdN8F5281ca1bsvuwVO93ZNKSc=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>EbEv86Ugl7kwNrxRQZ3P6k/luHcERKstWZcVNQN9ZMc4un3zOM6m/Q==</SignatureValue>
<KeyInfo>
<KeyValue>
<DSAKeyValue>
<P>/X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuA
HTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOu
K2HXKu/yIgMZndFIAcc=
</P>
<Q>l2BQjxUjC8yykrmCouuEC/BYHPU=</Q>
<G>9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3
zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKL
Zl6Ae1UlZAFMO/7PSSo=
</G>
<Y>7MHcj1nEytl2jHY2ymbbNGOcKs6lYxLi5PPd7C/y3drRRTd6nshekxtBK6F4tyxn9aioVufeqHTS
P46TQe6Qc4tm1OmkxB4/JS1ZrQb18Spem/wa0UR+z7HjwwKTPExTiuyVOgZUO01OufCd00x/lT3h
NxceIz2AmxQ8L8pKanY=
</Y>
</DSAKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
<transactionNumber>1</transactionNumber>
<status>COMPLETED</status>
</CompleteTransactionRequest>
</tran:completeTransaction>
</soapenv:Body>
</soapenv:Envelope>
Ответ будет следующим:
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header></env:Header>
<env:Body>
<ns3:completeTransactionResponse xmlns:ns2="http://www.w3.org/2000/09/xmldsig"
xmlns:ns3="http://www.allpay.kz/mfs/soap/TransactionManagement">
<return>
<errorInfo>OK</errorInfo>
<result>
<amount>1</amount>
<blocked>false</blocked>
<fromAccountNumber>fromAcc</fromAccountNumber>
<fromUserLoginName>fromUser</fromUserLoginName>
<status>COMPLETED</status>
<toAccountNumber>toAcc</toAccountNumber>
<toUserLoginName>toUser</toUserLoginName>
<transactionNumber>31337</transactionNumber>
</result>
</return>
</ns3:completeTransactionResponse>
</env:Body>
</env:Envelope>
Описание полей аналогично запросу getTransactionRequest.xml