Skip to content

Conversation

@khantilpatel
Copy link

The bluepay transaction call is throwing random error even when the Transactions are successful. This happens only when the API response has Result variable at first place in the URL parameter like Location: /interfaces/wlcatch?Result=APPROVED&CVV2=_&TRANSACTION_TYPE=SALE&..... So when parse_str in parseResponse tries to parse the URL parameters then it parses the key string for Result variable as Location: /interfaces/wlcatch?Result => APPROVED instead of Result => APPROVED.

In fact, because of this bug any variable that appears after ? was not getting parsed and thus it'll throw random errors like null transaction Id.

Fix: So the fix is to remove the string Location: /interfaces/wlcatch? before $header value is assigned to $this->response.

The bluepay transaction call is throwing random error even when the Transactions are successful. This happens only when the API response has `Result` variable at first place in the URL parameter like `Location: /interfaces/wlcatch?Result=APPROVED&CVV2=_&TRANSACTION_TYPE=SALE&....`. So when `parse_str` in `parseResponse` tries to parse the URL parameters then it parses the key string for `Result` variable as `Location: /interfaces/wlcatch?Result => APPROVED` instead of `Result => APPROVED`. 

In fact, because of this bug any variable that appears after `?` was not getting parsed and thus it'll throw random errors like null transaction Id.

Fix: So the fix is to remove the string `Location: /interfaces/wlcatch?` before $header value is assigned to `$this->response`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant