I'm working on a custom payment extension, when save payment method it validate some inputs added from payment method selection step.

if those not valid it returns

throw new Mage_Payment_Exception($errorMessage, $errorMessageField);

But when i check ajax request of payment method save step the response says 503 error

this the code of error handler

private function throwPaymentException($errorMessage)
        //Because OSC does not show the errorMessage from the exception, we also store the error in the session. This
        //way we can collect it from the session and display it in the form.
        $_SESSION[self::VALIDATION_MESSAGE] = $errorMessage;

        //Throw the exception
        $errorMessageField = 'p_method_' . self::PAYMENT_METHOD_BILLINK_CODE;

        throw new Mage_Payment_Exception($errorMessage, $errorMessageField);


This code return 503 error and prevent checkout ajax throw new Mage_Payment_Exception($errorMessage, $errorMessageField);

when i remove that code checkout goes to next step, but the validations are not working

Anyone know why the site show 503 error after throw Mage_Payment_Exception for show the errors on font-end.

Thank You

0 Answers