<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Paypal - aggiornamenti alla sicurezza]]></title><description><![CDATA[<p dir="auto">Ciao a tutti, ho bisogno di un vostro aiuto/chiarimento su una mail inviata da Paypal riguardo alcuni aggiornamenti sulla sicurezza, ci sono diversi punti che fanno riferimento alla url per l'ipn che dovrà essere su protocollo HTTPS:</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>"A partire da questa data, gli endpoint API Sandbox supporteranno solo il nuovo standard (HTTP/1.1, TLS 1.2 e i certificati SHA-256). Ciò significa che l'url <a href="http://sandbox.paypal.com" rel="nofollow ugc">sandbox.paypal.com</a> accetterà solo HTTPS per i postback IPN."</th>
</tr>
</thead>
</table>
<p dir="auto">Se ho capito bene, non ci sono modifiche da fare al codice php ma bisogna adeguare tutti i siti che utilizzano l'ipn di paypal su protocollo HTTPS, corretto? Avete ricevuto anche voi questa email?</p>
<p dir="auto">Qui in basso vi riporto il codice che uso in php per i messaggi IPN ricevuti da paypal (questo dovrebbe rimanere invariato):</p>
<p dir="auto">$raw_post_data = file_get_contents('php://input');</p>
<p dir="auto">$this-&gt;dump = var_export($raw_post_data, true);<br />
$raw_post_array = explode('&amp;', $raw_post_data);<br />
$myPost = array();<br />
foreach ($raw_post_array as $keyval) {<br />
$keyval = explode('=', $keyval);<br />
if (count($keyval) == 2)<br />
$myPost[$keyval[0]] = urldecode($keyval[1]);<br />
}</p>
<p dir="auto">$req = 'cmd=_notify-validate';<br />
if (function_exists('get_magic_quotes_gpc')) {<br />
$get_magic_quotes_exists = true;<br />
}<br />
foreach ($myPost as $key =&gt; $value) {<br />
if ($get_magic_quotes_exists == true &amp;&amp; get_magic_quotes_gpc() == 1) {<br />
$value = urlencode(stripslashes($value));<br />
} else {<br />
$value = urlencode($value);<br />
//$value = urlencode(html_entity_decode($value, ENT_QUOTES, 'UTF-8'));<br />
}<br />
$req .= "&amp;$key=$value";<br />
}<br />
try {<br />
$ch = curl_init(PAYPAL_URL);<br />
curl_setopt($ch, CURLOPT_POST, true);<br />
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);</p>
<p dir="auto">// Se c'è un proxy nel file di configurazione<br />
if (PROXY_CURL != "") {<br />
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);<br />
curl_setopt($ch, CURLOPT_PROXY, PROXY_CURL);<br />
}</p>
<p dir="auto">curl_setopt($ch, CURLOPT_HEADER, false);<br />
curl_setopt($ch, CURLOPT_TIMEOUT, 180);<br />
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);</p>
<p dir="auto">if (!($res = curl_exec($ch))) {<br />
$this-&gt;sendLog("Errore " . curl_error($ch) . " nella chiamata IPN a paypal");<br />
curl_close($ch);<br />
exit;<br />
}<br />
curl_close($ch);<br />
} catch (Exception $ex) {<br />
// NOTIFICO ERRORE<br />
}</p>
<p dir="auto">if (strcmp($res, "VERIFIED") == 0) {<br />
$item_name = $_POST['item_name'];<br />
$item_number = $_POST['item_number'];<br />
$payment_status = $_POST['payment_status'];<br />
$payment_amount = $_POST['mc_gross'];<br />
$payment_currency = $_POST['mc_currency'];<br />
$txn_id = $_POST['txn_id'];<br />
$receiver_email = $_POST['receiver_email'];<br />
$payer_email = $_POST['payer_email'];<br />
$CUSTOM = $_POST['custom'];<br />
$this-&gt;SaveOrder($IDORDINE, $payment_amount);<br />
} else if (strcmp($res, "INVALID") == 0) {<br />
$this-&gt;sendLog("INVALID");<br />
}</p>
<p dir="auto">Grazie in anticipo a chi si interessa al thread.<br />
Ciao,<br />
Luca</p>
]]></description><link>https://dev.connect.gt/topic/219910/paypal-aggiornamenti-alla-sicurezza</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 01:26:52 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/219910.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 22 Dec 2015 17:10:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Paypal - aggiornamenti alla sicurezza on Wed, 06 Jan 2016 14:51:08 GMT]]></title><description><![CDATA[<p dir="auto">In teoria mi sembra di capire che è un cambiamento lato loro che non influisce su di te.</p>
<p dir="auto">Quello che succederà è che andrà chiamata la versione https e non quella http che molto probabilmente farà un redirect e dunque invaliderà eventuali post.</p>
]]></description><link>https://dev.connect.gt/post/1213614</link><guid isPermaLink="true">https://dev.connect.gt/post/1213614</guid><dc:creator><![CDATA[juanin]]></dc:creator><pubDate>Wed, 06 Jan 2016 14:51:08 GMT</pubDate></item></channel></rss>