Redirect always goes to /paynow/callback instead of Return URL


#1

Hello PayNow Team,

I’m integrating PayNow using the official PHP SDK ( paynow/php-sdk version 1.0.5) in a Laravel project

Setup:

  • Callback URL: https://xxxxxxxx/paynow/callback
  • Return URL: https://xxxxxxxxx/donate/thank-you
  • Laravel SDK code passes the URLs from config ( config/paynow.php ).
  • NGROK is used for local testing

Issue:
Whenever a user cancels or completes a payment, the browser is always redirected to the callback URL ( /paynow/callback ) instead of the Return URL ( /donate/thank-you ).

Notes:

  • The callback is working correctly and updates the database as expected.
  • The Return URL seems to be ignored by PayNow.
  • SDK version 1.0.5 does not support per-payment URL overrides , so it relies on the Integration ID configuration.
  • I cannot find any Integration Settings in my PayNow dashboard to update the Return URL.

Question:
How can I ensure that users are redirected to the Return URL ( /donate/thank-you ) instead of the callback URL?
Is there a way to update the Return URL for my Integration ID if the dashboard does not show Integration Settings?

Thanks in advance!


#2

Good day @allyson

Please note that paynow does not ignore your return url, its where it takes the user after a payment is done(Cancelled or success), Paynow also supports per-payment return URL, each payment is initiated with its own return url.

Reference

please dm your integration id


#3

Hi @allyson

The URLs shared in your request are incorrect. You have interchanged the Result URL and the Return URL. They should be the opposite of what was shared:

Correct configuration:
Result URL:
https://xxxxx-free.dev/paynow/callback

Return URL:
https://xxxxxx.ngrok-free.dev/donate/thank-you

In the SQK returnUrl is the first parameter

$paynow = new Paynow\Payments\Paynow(
‘INTEGRATION_ID’,
‘INTEGRATION_KEY’,
‘return_url’,
‘resulturl’
);