XML API plugin example message and digest
Secret=Cardlink1
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?><VPOS xmlns=”http://www.modirum.com/schemas/vposxmlapi41″ xmlns:ns2=”http://www.w3.org/2000/09/xmldsig#”><Message version=”2.1″ messageId=”M1560776758348″ timeStamp=”2019-06-17T16:05:58.348+03:00″><SaleRequest><Authentication><Mid>0000001</Mid></Authentication><OrderInfo><OrderId>1560776271083</OrderId><OrderDesc>Test</OrderDesc><OrderAmount>1.25</OrderAmount><Currency>EUR</Currency><PayerEmail></PayerEmail></OrderInfo><PaymentInfo><PayMethod>visa</PayMethod><CardPan>4016000000002</CardPan><CardExpDate>2206</CardExpDate><CardCvv2>756</CardCvv2><CardHolderName>John Smith</CardHolderName></PaymentInfo></SaleRequest></Message><Digest>DNC6o0Q2Z+BUkWv9NwJtO/tm4SFe8jJM/7UW0PL0Er4=</Digest></VPOS>
Message part canonicalized note xmlns added:
<Message xmlns=”http://www.modirum.com/schemas/vposxmlapi41″ xmlns:ns2=”http://www.w3.org/2000/09/xmldsig#” messageId=”M1560776758348″ timeStamp=”2019-06-17T16:05:58.348+03:00″ version=”2.1″><SaleRequest><Authentication><Mid>0000001</Mid></Authentication><OrderInfo><OrderId>1560776271083</OrderId><OrderDesc>Test</OrderDesc><OrderAmount>1.25</OrderAmount><Currency>EUR</Currency><PayerEmail></PayerEmail></OrderInfo><PaymentInfo><PayMethod>visa</PayMethod><CardPan>4016000000002</CardPan><CardExpDate>2206</CardExpDate><CardCvv2>756</CardCvv2><CardHolderName>John Smith</CardHolderName></PaymentInfo></SaleRequest></Message>Cardlink1
Then append Cardlink1 and apply sha2-256 function.
You will get digest
<Digest>DNC6o0Q2Z+BUkWv9NwJtO/tm4SFe8jJM/7UW0PL0Er4=</Digest>
Response example:
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?><VPOS xmlns=”http://www.modirum.com/schemas/vposxmlapi41″ xmlns:ns2=”http://www.w3.org/2000/09/xmldsig#”><Message version=”2.1″ messageId=”M1560776758348″ timeStamp=”2019-06-17T16:05:58.517+03:00″><SaleResponse><OrderId>1560776271083</OrderId><OrderAmount>1.25</OrderAmount><Currency>EUR</Currency><PaymentTotal>1.25</PaymentTotal><Status>CAPTURED</Status><TxId>927703881</TxId><PaymentRef>104040</PaymentRef><RiskScore>10</RiskScore><Description>OK, CAPTURED response code 00</Description><Attribute name=”EXTACQUIRERID”>014</Attribute></SaleResponse></Message><Digest>oavTfZECv1L8hKcjw0mV+bOvIjSdq+UNSNU7/xRvnAA=</Digest></VPOS>