Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix random exception being thrown for Approved Transactions #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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