Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isset($_GET['tx'])) {
- $req = 'cmd=_notify-synch';
- $tx_token = $_GET['tx'];
- $auth_token = "AAAAA";
- $req .= "&tx=$tx_token&at=$auth_token";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "https://$pp_hostname/cgi-bin/webscr");
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array("Host: $pp_hostname"));
- $res = curl_exec($ch);
- curl_close($ch);
- if(!$res){
- echo "Overenie vašej platby zlyhalo!";
- }else{
- $lines = explode("\n", trim($res));
- $keyarray = array();
- $success = false;
- $order = null;
- if (strcmp ($lines[0], "SUCCESS") == 0) {
- for ($i = 1; $i < count($lines); $i++) {
- $temp = explode("=", $lines[$i],2);
- $keyarray[urldecode($temp[0])] = urldecode($temp[1]);
- }
- $success = true;
- if ($keyarray["payment_status"]
- /// atd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement