Open lkallas opened 6 years ago
I was able to somewhat debug it.
As this error occurs here by the stacktrace above:
/home/webshop/swedbank-spp/vendor/jms/serializer/src/JMS/Serializer/Serializer.php(127): JMS\Serializer\XmlDeserializationVisitor->prepare('<?xml version="...')
I printed out the variable $data in line 127 and I got this:
<?xml version="1.0" encoding="UTF-8"?>
<Response version="2">
<time>1508410583</time>
<reason>ACCEPTED</reason>
<CardTxn>
<Cv2Avs>
<cv2avs_status>SECURITY CODE MATCH ONLY</cv2avs_status>
</Cv2Avs>
<ThreeDSecure>
<aav>jAAAEBhVghUIQRUIQQWCAAAAAAA=</aav>
<cardholder_registered>yes</cardholder_registered>
<cavvAlgorithm>3</cavvAlgorithm>
<eci>02</eci>
<xid>MDAwMDAwMDAwMDAwMTg4OTQ2MzU=</xid>
</ThreeDSecure>
<authcode>907097</authcode>
<card_scheme>Debit Mastercard</card_scheme>
</CardTxn>
<MAC>
<outcome>ACCEPT</outcome>
</MAC>
<Risk>
<action_response>
<bankresult_response>
<cpi_value>▒#▒</cpi_value>
<response_code>00</response_code>
<response_message>Successful</response_message>
<transaction_id>3900900018894635</transaction_id>
</bankresult_response>
<screening_response>
<additional_messages>
<message>▒#▒</message>
</additional_messages>
<cpi_value>▒#▒</cpi_value>
<response_code>00</response_code>
<response_message>Transaction Approved</response_message>
<transaction_id>3900900018894635</transaction_id>
</screening_response>
</action_response>
</Risk>
<acquirer>Swedbank Baltic Latvia</acquirer>
<datacash_reference>3900900018894635</datacash_reference>
<extended_response_message>Approved, OK</extended_response_message>
<extended_status>000</extended_status>
<merchantreference>3900900018894635</merchantreference>
<mid>1000000000</mid>
<mode>LIVE</mode>
<status>1</status>
</Response>
But this time the error is: PCDATA invalid Char value 28 in (line: 34, column: 23)
As you can see there are weird characters inside this XML:
<cpi_value>▒#▒</cpi_value>
Found a solution.
No XML errors when using ScreeningAction::postAuthorization()
while calling HCC authorization()
function.
The error persists when using ScreeningAction::preAuthorization()
.
Please comment what is ScreeningAction and what is the difference between pre and post.
Hi Ikallas,
Making proper HCC example for you. From it will be clear how it works.
Using HCC card payment in test environment I receive this error in the very last step: [FATAL] PCDATA invalid Char value 28 in (line: 37, column: 33).
This error is triggered when this code returns:
stacktrace:
DEBUG XML: