Open rootpd opened 3 years ago
Based on the latest doc (2.0.4), Comfortpay can return SoapFault (exceptions) with error codes with the real meaning:
2.0.4
SoapFault
50000
50001
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
The error response can look like this:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:types="urn:tatrabanka:ibanking:Types" xmlns:teleplatba="urn:tatrabanka:ibanking:Teleplatba" xmlns:vposCommon="http://www.ri-rpc.sk/cmsdd/aim/common" xmlns:vposAuth="http://www.ri-rpc.sk/cmsdd/aim/vposAuth" xmlns:vposAuthFollow="http://www.ri-rpc.sk/cmsdd/aim/vposAuthFollow" xmlns:vposAuthResponse="http://www.ri-rpc.sk/cmsdd/aim/vposAuthResponse"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <SOAP-ENV:Code> <SOAP-ENV:Value>SOAP-ENV:Receiver</SOAP-ENV:Value> </SOAP-ENV:Code> <SOAP-ENV:Reason> <SOAP-ENV:Text xml:lang="en"></SOAP-ENV:Text> </SOAP-ENV:Reason> <SOAP-ENV:Detail> <types:ExceptionType> <method>checkCard</method> <file>ImplFile</file> <line>2022</line> <errorCode>50000</errorCode> <subsystemId>19</subsystemId> <subsystemErrorCode>0</subsystemErrorCode> <message></message> </types:ExceptionType> </SOAP-ENV:Detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
To correctly handle these cases, library should probably catch SoapFault and extract errorCode from the response, same way as it extracts transactionStatus in successful payment.
errorCode
transactionStatus
Based on the latest doc (
2.0.4
), Comfortpay can returnSoapFault
(exceptions) with error codes with the real meaning:50000
Všeobecná chyba počas spracovania transakcie Decline50001
Došlo k timeoutu počas spracovania In progress50051
Neexistujúce CID Decline50052
Nekorektné Merchant ID Decline50053
Záporná hodnota amount Decline50054
Duplicitné transaction ID Decline50055
Nekorektný VS/SS– presahuje 10 digits Decline50056
Nekorektná E2E – viac ako 35 znakov Decline50057
Chyba parentTransactionId Decline50058
Nekorektný VS/SS obsahuje AN znaky Decline50059
1. Presiahnutá suma pôvodnej autorizácie Decline50060
Neexistujúca parent transakcia (s daným VS/E2E, typom, stavom, menou, nie staršia ako 365 dní)The error response can look like this:
To correctly handle these cases, library should probably catch
SoapFault
and extracterrorCode
from the response, same way as it extractstransactionStatus
in successful payment.