Note that there are some explanatory texts on larger screens.

plurals
  1. POXML invalid tags
    text
    copied!<p>what i should do to prevent invalid XML tags in the custom getaway's callback function?</p> <pre><code>$h = fopen("banks/Mybank/log.txt", 'a'); fwrite($h, 'ConfirmRequest: '.print_r($_REQUEST['ConfirmRequest'],true)."\n"); fclose($h); </code></pre> <p>the output is:</p> <pre><code>ConfirmRequest: &amp;lt;ConfirmRequest&amp;gt;&amp;lt;TransactionId&amp;gt; Cool Attitude #89&amp;lt;/TransactionId&amp;gt;&amp;lt;PaymentId&amp;gt;327600020200&amp;lt;/PaymentId&amp;gt;&amp;lt;PaymentDate&amp;gt;02.10.2013 23:41:26&amp;lt;/PaymentDate&amp;gt;&amp;lt;Amount&amp;gt;7000&amp;lt;/Amount&amp;gt;&amp;lt;CardType&amp;gt;VISA!472291******9871&amp;lt;/CardType&amp;gt;&amp;lt;Status&amp;gt;N&amp;lt;/Status&amp;gt;&amp;lt;Reason&amp;gt;Declined by merchant&amp;lt;/Reason&amp;gt;&amp;lt;/ConfirmRequest&amp;gt; </code></pre> <p>the result is same on</p> <pre><code>$_REQUEST['ConfirmRequest']; </code></pre> <p>and</p> <pre><code>$this-&gt;resuest-&gt;request['ConfirmRequest']; </code></pre> <p>==========================</p> <p>huge thanks to gloomy.penguin! can you tell me please, what have i done wrong here? </p> <pre><code>if( !openssl_verify( 'ConfirmRequest='.$ConfirmRequest, base64_decode($signature), openssl_get_publickey($cert) ) ) die("signature error"); $parser = xml_parser_create(''); xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($parser, $ConfirmRequest, $vals); xml_parser_free($parser); foreach ($vals as $data) { if ($data['tag']=='STATUS') $Status=$data['value']; if ($data['tag']=='PAYMENTID') $PaymentId=$data['value']; if ($data['tag']=='PAYMENTDATE') $PaymentDate=$data['value']; if ($data['tag']=='TRANSACTIONID') $TransactionId=$data['value']; if ($data['tag']=='AMOUNT') $Amount=$data['value']; if ($data['tag']=='REASON') $Reason=$data['value']; if ($data['tag']=='CARDTYPE') $CardType=$data['value']; } $sta = fopen("banks/MyBank/status.txt", 'a'); fwrite($sta, .print_r($data)."\n"); fclose($sta); </code></pre> <p>the output value is "1" ...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload