You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are giving $this->server the ability to fetch the saved transaction from the database, by giving it the storage object. That's fine so far; you are doing the dependency injection.
What you then need to do, is tell the server object to fetch the saved transaction, based on the POSTed VenderTxCode, then do a security check between other posted data and other fields on the transaction. That is all handled by:
The $result will be a string that you echo (back to SagePay) then immediately exit.
So in summary, notification($post, $final_page) uses VendorTxCode in $post to fetch the transaction from the database, do some security checks, then update the transaction in the database with the remaining fields in $post (which includes the authentication status, and your $final_page can pick all that up). Then it generates the return data that the SagePay notification caller is expecting.
You may want to use different return URLs, depending upon the authentication result. If so, then look at $post['STATUS'] and choose a URL based on that. However, I have found that a single "complete" page is usually easier to handle. That page can look at any authentication status, whether OK or otherwise, and make its decisions on how to handle it, and how to present that result to the end user.
Hi
public function anyCallback() {
the callback function is not taking $this->server->getField('Status') == 'OK'.. is there something i must consider?
Regards,
Prajwol
The text was updated successfully, but these errors were encountered: