Jump to content


Photo

Custom gateway validatePayment() not executed


After upgrade from 1.4 to 1.5.1 the custom gateway stopped working.

I've inserted several error_log('...') calls as debug traps inside payScreen() and validatePayment() functions.

Those from payScreen() are working and visible inside apache's error_log, those from validatePayment() are NOT executed.

As the result invoce/transaction statuses remain 'Pending' even if payment system has accepted and confirmed th payment. On the return-to-shop purchase stage user gets the error.

Payment system tries to call this link: http://domain.com/club/index.php?app=nexus&module=payments&section=receive&validate=robokassa

On this request (as I can understand) the validatePayment() function should be called, but it's not.

Status: Cannot Reproduce
Version: 1.5.1
Fixed In: 0


3 Comments

Updating Status to: Cannot Reproduce

What's the error message and code they see?

If it's 30X114, you need to make sure you have implemented the getTransactionId method in your gateway class.
Mark, thanks for checking this issue.

The error code recieved by payment system when it tries to call the Result URL (_http_://domain.com/club/index.php?app=nexus&module=payments&section=receive&validate=robokassa) is #30X117 (cannot locate invoce). And after several automatic retries it redirects user to the Fail URL (error code #30X113).

But the main reason I'm asking is that the validatePayment() function is not actualy executed when payment system tries to send data onto Result URL.


Can I get an example of any working payment gateway (not ioncubed)? The one from developer docs is too simplified and has at least one error right now.

It says:
$this->transaction, // The transaction ID number (you probably don"t need to change this)

But $this->transaction is an Array of different values, not just transaction ID.
Mark, you were right about the getTransactionId method. That was it.

Thank you very much.