Commit 15b5cd3 1 parent c1d5672 commit 15b5cd3 Copy full SHA for 15b5cd3
File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ public function request_list($message_class) {
173
173
174
174
}
175
175
176
- public function request_poll ($ request ) {
176
+ public function request_poll ($ request, $ return_error = false ) {
177
177
178
178
//--------------------------------------------------
179
179
// Honour timeout
@@ -205,7 +205,15 @@ public function request_poll($request) {
205
205
206
206
if ($ this ->response_qualifier == 'error ' ) {
207
207
208
- exit_with_error ('Error from gateway " ' . $ this ->response_object ->Body ->ErrorResponse ->Error ->Text . '" ' , $ this ->response_debug );
208
+ if ($ return_error && isset ($ this ->response_object ->Body ->ErrorResponse ->Error ->Text ) && isset ($ this ->response_object ->Header ->MessageDetails ->CorrelationID )) {
209
+
210
+ return strval ($ this ->response_object ->Body ->ErrorResponse ->Error ->Text ) . ' ( ' . strval ($ this ->response_object ->Header ->MessageDetails ->CorrelationID ) . ') ' ;
211
+
212
+ } else {
213
+
214
+ exit_with_error ('Error from gateway " ' . $ this ->response_object ->Body ->ErrorResponse ->Error ->Text . '" ' , $ this ->response_debug );
215
+
216
+ }
209
217
210
218
} else if ($ this ->response_qualifier == 'acknowledgement ' ) {
211
219
You can’t perform that action at this time.
0 commit comments