How to store the array values into database(mysql) after receiving them from paypal successfull payment complete transaction ?
i need an example here please help me out to solve this fuss. example should be easy, simple and well below is my form so tell how i can done this with proper example!

Anurag SarkarRank #1,049 · 1.8K reputationPosted Apr 28, 2015, 12:13 PM EDT
http://www.dotnetfunda.com/articles/show/928/online-payments-using-paypal-integration-with-aspnet
Thanks
kamal sooftphoton13 reputationPosted Apr 28, 2015, 12:47 PM EDT
anyways thanks for suggestions...
Anurag SarkarRank #1,049 · 1.8K reputationPosted Apr 28, 2015, 3:52 PM EDT
I Think this should work....
It's not too complicated.
You got a sandbox account for testing already? If not, signup for seller/buyer test-account at sandbox.paypal.com. Maybe need different e-mail addresses for both, not sure.
1.) In your submit form enter the path to your IPN script e.g.
pp.notifiy.phpAlso in your PayPal merchant/sandbox account settings, specify the URL of your listener. The listener script must not be firewalled. It will receive $_POST from PayPal.
2.) After successful payment,
VERIFIEDto process the order and update your db.I prefer the cURL solution, as PayPal had changes recently, which caused some troubles, with the cURL solution it worked fine for me especially when sandbox testing. Need cURL extension to be active in PHP.
For the cURL solution, read more on PayPal Developer: How To Process Instant Payment Notification (IPN) Messages; the other solution, which I'd NOT recommend uses fsockopen.
Here are parts of my working cURL listener script (pp.notify.php)
#$pp_url = "https://www.paypal.com/cgi-bin/webscr"; $pp_url = "https://www.sandbox.paypal.com/cgi-bin/webscr"; // build the request / postback $req = 'cmd=_notify-validate'; foreach($_POST AS $k => $v) { $v=urlencode(stripslashes($v)); $req.="&$k=$v"; } // post back to PayPal system to validate using curl $ch = curl_init($pp_url); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); 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_FORBID_REUSE, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close')); if(!($res=curl_exec($ch))) { #error_log("Got " . curl_error($ch) . " when processing IPN data"); curl_close($ch); exit; } $res = trim($res); curl_close($ch); // inspect IPN validation result and act accordingly if(strcmp($res,"VERIFIED")==0) { // The IPN is verified // update your db/process order... } else if (strcmp($res,"INVALID")==0) { // IPN invalid, log for manual investigation }This would work on the sandbox too. So best to do a couple of tests. You should get the
VERIFIEDand then process the order/update db. When all works fine, switch from sandbox to real PayPal and best to test that too at least once.I hope this helps for getting started!