Skip to content

Commit 0454e93

Browse files
committed
Issue #131 additional documentation on error recovery.
1 parent b7f1312 commit 0454e93

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,13 +701,19 @@ user's return. This will be at your `returnUrl` endpoint:
701701
// against the transactionId provided in the server request.
702702
// This prevents different payments getting mixed up.
703703

704-
$result = $gateway->completeAuthorize(['transactionId' => $originalTransactionId])->send();
704+
$completeRequest = $gateway->completeAuthorize(['transactionId' => $originalTransactionId]);
705+
$result = $completeRequest->send();
705706

706707
$result->isSuccessful();
707708
$result->getTransactionReference();
708709
// etc.
709710
```
710711

712+
Note that if `send()` throws an exception here due to a `transactionId` mismatch,
713+
you can still access the decryoted data that was brought back with the user as
714+
`$completeRequest->getData()`.
715+
You will need to log this for later analysis.
716+
711717
If you already have the encrypted response string, then it can be passed in.
712718
However, you would normally leave it for the driver to read it for you from
713719
the current server request, so the following would not normally be necessary:

0 commit comments

Comments
 (0)