Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

IPN response VERIFIED, raw data on php://input fine, but nothing on $_POST #149

Open
gagregori opened this issue Feb 13, 2019 · 3 comments

Comments

@gagregori
Copy link

gagregori commented Feb 13, 2019

$response is verified I have all data from IPN Simulator on a txt file, but when I try to find a value in post nothing is there, and I have wrote post in txt file, used vardump, print_r it has nothing on Post, but why if there is all data on raw input? Please help me, I'm soo tired of trying to figure out alone.

@gagregori
Copy link
Author

listener.txt

@gagregori
Copy link
Author

$value) { if ($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { $value = urlencode(stripslashes($value)); } else { $value = urlencode($value); } $req .= "&$key=$value"; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $req); $response = curl_exec($ch); curl_close($ch); if ($response == "VERIFIED") { $cEmail = $_POST['payer_email']; $name = $_POST['first_name'] . " " . $_POST['last_name']; $price = $_POST['mc_gross']; $currency = $_POST['mc_currency']; $item = $_POST['item_number']; $paymentStatus = $_POST['payment_status']; file_put_contents('test3.txt', file_get_contents('php://input')); } ?>

@gagregori
Copy link
Author

I'm gonna write a function to make an array from raw input since I dont have a POST to use,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant