thephpleague / omnipay-sagepay

Sage Pay driver for the Omnipay PHP payment processing library
MIT License
54 stars 78 forks source link

transactionId required in completePurchase but already available in POST #35

Closed jamieburchell closed 8 years ago

jamieburchell commented 9 years ago

The completePurchase method requires that the transactionId is passed to it, but this should already be known and available in the POST data from SagePay.

https://github.com/thephpleague/omnipay-sagepay/issues/34#issuecomment-124151070 https://github.com/academe/OmniPay-SagePay-Demo/blob/master/sagepay-confirm.php#L39

judgej commented 9 years ago

Marking as a bug, though minor with a clear workaround (i.e. got fetch transaction ID from the POST data and give it to the gateway, rather than leaving to gateway to get the transaction ID itself).

judgej commented 9 years ago

This is how Authorize.Net does it:

https://github.com/thephpleague/omnipay-authorizenet/blob/master/src/Message/SIMCompleteAuthorizeRequest.php#L16

judgej commented 8 years ago

This was fixed in https://github.com/thephpleague/omnipay-sagepay/commit/97610c0dac6cc547797b1934a51e84bbfff7eaa1#diff-0f493970ef222c4ff3349841d7227172

The transactionId is actually in the transactionReference that OmniPay provided for storage when the transaction was first created. It no longer needs to be passed into completePurchase - the transactionReference is enough.