|
Welcome,
Guest
|
|
|
I AM NOT GETTING THE "pesapal_notification_type" ON THE URL.
Below is my code. <?php require '../redirect.php'; require "../sys_connection.php"; $phon=$_SESSION['phon']; $detail = mysqli_query($_con_,"SELECT * FROM userregistration WHERE PHONE='$phon'") or die(mysqli_error()); $row = mysqli_fetch_array($detail); $fn=$row["FIRSTNAME"]; $ln=$row["LASTNAME"]; $mail=$row["EMAIL"]; include_once('OAuth.php'); $_amount=trim($_POST['_amnt__']); $_amount=filter_var($_amount, FILTER_SANITIZE_NUMBER_INT); if($_amount<50){ echo 'Please enter amount of not less than 50/-!';} else { include_once('OAuth.php'); // Pesapal parameters $token = $params = null; // PesaPal Sandbox is at demo.pesapal.com. Use this to test your // developement and when you are ready to go live change to // www.pesapal.com // Register a merchant account >'; $post_xml .= '<PesapalDirectOrderInfo '; $post_xml .= '>'; $post_xml = htmlentities($post_xml); $consumer = new OAuthConsumer($consumer_key, $consumer_secret); // Construct the OAuth Request URL & post transaction to pesapal $signature_method = new OAuthSignatureMethod_HMAC_SHA1(); $iframe_src = OAuthRequest::from_consumer_and_token($consumer, $token, 'GET', $iframelink, $params); $iframe_src -> set_parameter('oauth_callback', $callback_url); $iframe_src -> set_parameter('pesapal_request_data', $post_xml); $iframe_src -> sign_request($signature_method, $consumer, $token); // Display pesapal iframe and pass in iframe_src print''; print '<p>Browser unable to load iFrame</p>'; print ''; } ?> BELOW IS WHAT I GET ON THE URL; www.mywebsite.com/response.php?pesapal_t...nt_reference=3gbzAZ6 AS YOU CAN SEE I DON'T GET THE "pesapal_notification_type=" ON THE URL WHAT AM I DOING WRONG? PLEASE ASSIST. THANK YOU. |
|
Last Edit: 9 years, 11 months ago by collins.
|
|
Hi Collins,
That is not the correct code for IPN. It looks more like iframe code. Check out sample ipn code on the link below. developer.pesapal.com/how-to-integrate/ipn |
|
Last Edit: 9 years, 11 months ago by MaryCagell.
|
|
Hi Othiambo,
Thank you for the reply. The code is working correctly its just that due to some unknown reasons when I paste it here some parts don't disolay at all. Someone facing the exact same problem posted here: developer.pesapal.com/forum/2-pesapal-in...62-demo-ipn-listener I have the same code as his. I do not know whether he ever managed to solve it. Please assist. |
|
|
|
Check out the IPN code that I have attached herewith and see if it will work for you.
The issue is with your code, since other systems are receiving IPNs as usual. |
|
Last Edit: 9 years, 11 months ago by MaryCagell.
|
|
Thanks man.
I will tell you how it goes. |
|
|
|