php - Not able to get response on notify URL
Get the solution ↓↓↓I just integrate paypal to my site All is working good Add product , Payment , then back to success page but the only problem is notify_URL not works I add mail function to test response but didnt get any mail
echo '<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="notify_url" value="http://go4qp.com/fbtest/s1.php" />
<input type="hidden" name="return" value="http://www.urbaniacs.com/hideout/inventory/" />
<input type="hidden" name="custom" value="'. $custom .'">
<input type="hidden" name="item_number" value="'. $itemnumber .'">
<input type="hidden" name="item_name" value="' . $item->name . '">
<input type="hidden" name="amount" value="'. number_format($item->price,2) .'">
<input type="hidden" name="currency_code" value="USD">
<input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_SM.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>';
Answer
Solution:
try adding the mail function to your return page (IPN)
<input type="hidden" name="return" value="http://www.urbaniacs.com/hideout/inventory/" />
yournotify_url
will only work if you come back to your site manually after completing the payment process whereas the IPN will work instantly, also check if your mail function is working properly and onreturn
URL dont use any sessions.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: foreach() argument must be of type array|object, null given
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.