Skip to content

Commit 25e7568

Browse files
Add getTransactionId function.
eWay has a function to retrieve the merchant (originating website) generated ID but it should implement the standardised Omnipay one per https://github.com/thephpleague/omnipay#successful-response which is ->getTransactionId(); // the reference set by the originating website if available.
1 parent 5f16e49 commit 25e7568

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Message/RapidResponse.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,23 @@ public function getCardReference()
6363
return null;
6464
}
6565

66+
/**
67+
* Get the transaction ID as generated by the merchant website.
68+
*
69+
* @return string
70+
*/
71+
public function getTransactionId()
72+
{
73+
return $this->data['InvoiceNumber'];
74+
}
75+
6676
/**
6777
* Get InvoiceNumber - merchant reference for a transaction
78+
*
79+
* @deprecated Omnipay standard interface is to return this when getTransactionId
80+
* is called
81+
*
82+
* @see https://github.com/thephpleague/omnipay#successful-response
6883
*/
6984
public function getInvoiceNumber()
7085
{

0 commit comments

Comments
 (0)