I'm in the process of adapting the old RealEx gateway to work in Commerce 2 since that's what we're using and there isn't native support in V2.

I've got payments and 3D secure working, now I'm trying to get refunds sorted but running into issues.

Firstly, the old plug-in has a get/set for OriginalTransactionId which I guess was something in V1?? Would anyone happen to know how to get the original transaction ID?

Would $this->getTransactionId() suffice?

Also, how would I get a value from the original response? I need to grab authcode from this response saved in the DB:

    "@attributes": {
        "timestamp": "20191007113507"
    "account": "XXX",
    "authcode": "12345",
    "authtimetaken": "0",
    "avsaddressresponse": "M",
    "avspostcoderesponse": "M",
    "batchid": "707751",
    "cardissuer": {
        "bank": "AIB BANK",
        "country": "IRELAND",
        "countrycode": "IE",
        "region": "EUR"
    "cvnresult": "M",
    "merchantid": "XXX",
    "message": "[ test system ] AUTHORISED",
    "orderid": "XXXX",
    "pasref": "XXXX",
    "result": "00",
    "sha1hash": "XXXX",
    "srd": "XXXX",
    "timetaken": "0"

The old code used:

public function getAuthCode()
    return $this->getParameter('authCode');

public function setAuthCode($value)
    return $this->setParameter('authCode', $value);

But this returns empty.

I appreciate any help anyone can provide.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.