diff --git a/README.md b/README.md index f0c4c32..4adb0d7 100644 --- a/README.md +++ b/README.md @@ -701,13 +701,19 @@ user's return. This will be at your `returnUrl` endpoint: // against the transactionId provided in the server request. // This prevents different payments getting mixed up. -$result = $gateway->completeAuthorize(['transactionId' => $originalTransactionId])->send(); +$completeRequest = $gateway->completeAuthorize(['transactionId' => $originalTransactionId]); +$result = $completeRequest->send(); $result->isSuccessful(); $result->getTransactionReference(); // etc. ``` +Note that if `send()` throws an exception here due to a `transactionId` mismatch, +you can still access the decryoted data that was brought back with the user as +`$completeRequest->getData()`. +You will need to log this for later analysis. + If you already have the encrypted response string, then it can be passed in. However, you would normally leave it for the driver to read it for you from the current server request, so the following would not normally be necessary: