I am using Magento (Ver 1.9.x)

If i try with my localhost success url like,

and return success message with order id.

if i try with live, success url like,

success page like blank page.

How to solve the issue?

Code : https://github.com/ZusZus/Payubiz

Dani AI

Generated

As observed, a blank success page almost always means PHP hit a fatal error or output was suppressed. For Magento 1.9.x using a third‑party redirect handler, the usual culprits are: suppressed PHP errors, missing/unsupported PHP extensions or PHP version mismatches, the gateway returning POST data while the controller expects session data, mod_security/hosting filters, or an exception inside the module controller. The fastest wins are to turn on logging and capture exactly what the gateway sends back.

Enable quick, safe debugging (staging only)

  • Turn on Magento logs (Admin -> System -> Configuration -> Developer -> Log Settings -> Enabled = Yes) and inspect var/log/system.log, var/log/exception.log and var/report for a report id.
  • Temporarily enable developer output in index.php (do not leave this on production):
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
error_reporting(E_ALL);

Log the gateway response inside the redirect controller (top of successAction) to prove what Payubiz is returning:

Mage::log($_REQUEST, null, 'payubiz_response.log', true);
file_put_contents(Mage::getBaseDir('var') . '/log/payubiz_raw.log', file_get_contents('php://input') . PHP_EOL, FILE_APPEND);

Key checks and fixes

  • Session loss: many success pages rely on session values like last_order_id. Make the controller robust by reading the order id from POST/GET and loading it directly:
$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
  • PHP/environment: confirm phpversion(), required extensions (curl, openssl, json), and that the server supports TLS 1.2 if Payubiz requires it. Tail webserver/PHP-FPM logs (e.g. /var/log/apache2/error.log or /var/log/nginx/error.log) to capture fatal traces. Clear var/cache and var/session, check file permissions, and review mod_security or host WAF logs for blocked POSTs.

This set of steps will reveal the error (or prove the gateway payload) so the controller can be changed from session-dependent logic to a POST-driven acknowledgement, which is the reliable fix for redirect-based gateways.

Recommended Answers

All 3 Replies

I just checked your Github repository and it seems you’re using a PHP framework. Does it log errors anywhere? Does your web server log errors already anywhere?

Oh sorry. I see you’re using Magento. Sorry for asking if you’re using a framework. I was tired when I read your post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.