paypal - Instant Payment Notification -


i want have vip buy button, have button text box (generated pp) , code(its not full, classic ipn code paypal give u in tutorial, showing part changes):

...........     // step 3: inspect ipn validation result , act accordingly      if (strcmp ($res, "verified") == 0) {         // ipn verified, process it:         // check whether payment_status completed          // check txn_id has not been processed         // check receiver_email primary paypal email         // check payment_amount/payment_currency correct         // process notification          // assign posted variables local variables         $item_name = $_post['item_name'];          $item_number = $_post['item_number'];         $payment_status = $_post['payment_status'];         $payment_amount = $_post['mc_gross'];         $payment_currency = $_post['mc_currency'];         $txn_id = $_post['txn_id'];         $receiver_email = $_post['receiver_email'];         $payer_email = $_post['payer_email'];         $player_indentificator = $_post["player_id"];         mail("ales.nezbeda@gmail.com", "test", $player_indentificator)          // ipn message values depend upon type of notification sent.         // loop through &_post array , print nv pairs screen:         foreach($_post $key => $value) {           echo $key." = ". $value."<br>";         }     } else if (strcmp ($res, "invalid") == 0) {         // ipn invalid, log manual investigation         echo "the response ipn was: <b>" .$res ."</b>";     }     ?> 

but when pay, dont recieve email. why? maybe im doing wrong , maybe terribly wrong.

1) need make sure ipn enabled in account you're working with. if you're working on sandbox need make sure ipn enabled in account profile , pointing ipn url you'd use. if you're working live account same thing in live account. see people have setup in 1 place they're submitting payment other. make sure that's not case here.

2) profile overridden using notify_url parameter in html buttons or notifyurl parameter in api requests. using either of these methods? if so, double check value of url can ensure you're hitting correct url.

3) if you've verified above need @ ipn history in paypal account you're working with. show if it's sending ipn's or not when transactions occur, , display result code got server when posted ipn.

if don't see logs in ipn history need double check mentioned above because it's not configured send reason.

if see logs in there show other 200 result means have problem ipn script needs resolved. syntax error or silly that. looking @ web server logs determine error.

another thing create simple html form bunch of hidden fields represent expect ipn. set action of form ipn url , can load in browser , submit see result on screen. can improve ability find , fix problems. once working expected way can rest assured it'll work same way when real ipn's sent.

just keep in mind when testing way data not coming paypal not verify. you'll need make sure code logic setup handle accordingly. log unverified ipn's , send myself email need transaction since unverified.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -