Status update from Paynow server


#1

Where and How can I call or initiate result url to update my database file paynow server , I have a separate php script for update but i dont have any idea of making it as a result url


#2

Hi @lastmadanhire, are you using the php sdk?


#3

Yes Iam using php sdk


#4

When you instantiate the PayNow() object, among the values you set is the result url. This is where PayNow automatically takes the user to once the transaction has been processed.

$paynow = new Paynow\Payments\Paynow(
    'INTEGRATION_ID',
    'INTEGRATION_KEY',
    'http://example.com/gateways/paynow/update',

    // The return url can be set at later stages. You might want to do this if you want to pass data to the return url (like the reference of the transaction)
    'http://yourwebsite.com/your-separate-php-file.php?key=value'
);

#5

Is this a default or I have to replace example.com?, because it redirects me to ‘http://example.com/gateways/paynow/update’ after transaction, may you please shade light on this


#6

You have to replace example.com with the url you want your users to be redirected to on your site.


#7

i am getting this error

Fatal error : Uncaught exception ‘Paynow\Payments\HashMismatchException’ in C:\xampp\htdocs\Tadiwa\Paynow\src\Payments\Paynow.php:325 Stack trace: #0 C:\xampp\htdocs\Tadiwa\update.php(18): Paynow\Payments\Paynow->processStatusUpdate() #1 {main} thrown in C:\xampp\htdocs\Tadiwa\Paynow\src\Payments\Paynow.php on line 325