Skip to content

Commit 4a773a3

Browse files
#261 clarify meaning of transactionRef and add transactionId as a standard parameter
1 parent 3d7b925 commit 4a773a3

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/Omnipay/Common/Message/AbstractRequest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,8 @@ public function setDescription($value)
455455
/**
456456
* Get the transaction ID.
457457
*
458+
* The transaction ID is the identifier generated by the originating website.
459+
*
458460
* @return string
459461
*/
460462
public function getTransactionId()
@@ -476,6 +478,8 @@ public function setTransactionId($value)
476478
/**
477479
* Get the transaction reference.
478480
*
481+
* The transaction reference is the identified generated by the payment gateway.
482+
*
479483
* @return string
480484
*/
481485
public function getTransactionReference()

src/Omnipay/Common/Message/AbstractResponse.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class AbstractResponse implements ResponseInterface
3737
* @var RequestInterface
3838
*/
3939
protected $request;
40-
40+
4141
/**
4242
* The data contained in the response.
4343
*
@@ -144,7 +144,17 @@ public function getCode()
144144
*/
145145
public function getTransactionReference()
146146
{
147-
return null;
147+
return $this->getParameter('transactionReference');
148+
}
149+
150+
/**
151+
* Get the transaction ID as generated by originating website.
152+
*
153+
* @return string
154+
*/
155+
public function getTransactionId()
156+
{
157+
$this->getParameter('transactionId');
148158
}
149159

150160
/**

0 commit comments

Comments
 (0)