Pesapal.com

Forum

Welcome, Guest
Username
Password:
 

IPN listener
(1 viewing) (1) Guest
Welcome to the Pesapal integration forum!

This forum discusses everything about Pesapal integration on your web site. Having any problems? This is the right place to post a question and we are sure you will get an answer
  • Page:
  • 1

TOPIC: IPN listener

IPN listener 12 years, 7 months ago #515

  • gatimu
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I would like to know how to implement this action. How should I query for Instant Payment Notifications? if for example i have a link www.example.com/query_payment.php how should i structure the query?

Re: IPN listener 12 years, 7 months ago #516

Gatimu,take a look at this script here. github.com/itsmrwave/pesapal-php/blob/ma...pal-ipn-listener.php
It works flawlessly.
At this section: $db_update_successful = IF_YOUR_DB_UPDATE_IS_SUCCESSFUL_THIS_IS_UPTO_YOU_TO_DETERMINE;
Insert your query. For instance:
$query = "UPDATE transactions SET
status = '{$status}' WHERE merchant_reference = {$pesapal_merchant_reference} ";
$db_update_successful = mysql_query($query, $connection);

Be sure to pass in your database $connection (and include connection.php if it is a required file).
  • Page:
  • 1