entity icon indicating copy to clipboard operation
entity copied to clipboard

Investigate - Clients have the ‘Name Request encountered an error’ issue when trying to pay for a request.

Open ozamani9gh opened this issue 1 year ago • 7 comments

Known Bug Workaround identified by Business

Priority 1: We still find clients have the ‘Name Request encountered an error’ issue when trying to pay for a request. I understand this may be localized to individual’s computers, but it’s an ongoing issue that is deeply frustrating for clients, and difficult for us as examiners, especially since we can’t offer them an alternative way to pay for a request. Telling them to clear their cache or call Service BC is not always a fix, especially if they’re from a foreign jurisdiction and unable to work with SBC. We need a way to take payment for clients who experience this issue. (Frequency 25%) Time cost: Initial time cost (phones/emails/ticket) approx. 1-2 hrs/week. Residual time cost (follow-up calls/emails/status request/ticket follow-up) approx. 1-2 hrs/week

ozamani9gh avatar May 27 '24 21:05 ozamani9gh

ticket to Timeboxed for investigation as per estimation attached. Omid to follow up with next approach to resolve as it may require relating with other teams who use the pay system.

fodiley avatar May 31 '24 18:05 fodiley

Status - Currently being reviewed, @flutistar and @EPortman have already approved the changes.

shaangill025 avatar Jun 24 '24 17:06 shaangill025

@shaangill025 let us know if you built this in dev, you can now go ahead and build in test, please start the CD, i will approve, you verify and then we can move it to ready for QA

ozamani9gh avatar Jun 27 '24 16:06 ozamani9gh

@shaangill025 / @ozamani9gh - what repo is this code in?

rarmitag avatar Jun 28 '24 18:06 rarmitag

@rarmitag I don't remember reviewing this PR. The PR of @shaangill025 that @flutistar and I reviewed together was 20999.

https://app.zenhub.com/workspaces/names-team-board-new-655554cbddd49510027dad2e/issues/gh/bcgov/entity/20999

EPortman avatar Jun 28 '24 19:06 EPortman

Please disregard my earlier comment regarding code review, this was done mistakenly and not meant for this issue. Sorry for the confusion.

I was able to reproduce the issue by:

  • In name-request, sign in with BC Service card [test account - BCREG0023]
  • Create a Sole prop and pay with test credit card. Note that it happens very rarely: After payment and redirection back to name-request, get the NR encountered error. This error persists and hinders the process to try and create a new NR even after refresh.

Investigation Results

image

  • After redirection from PayBC, there is sessionPaymentId and sessionPaymentAction in session storage which triggers fetchData() in namerequest/src/components/dialogs/payment-complete.vue.
  • https://github.com/bcgov/namerequest/blob/ad2eaeef94abfdf84b69ba68e77c0fa80ba028ce/src/components/dialogs/payment-complete.vue#L112 , this calls getNameRequest() in namex-services
  • https://github.com/bcgov/namerequest/blob/ad2eaeef94abfdf84b69ba68e77c0fa80ba028ce/src/services/namex-services.ts#L333 , due to CORS error when calling /api/v1/namerequests endpoint it is returning null which is erroring out as shown in the screenshot above
  • In Namex, https://github.com/bcgov/namex/blob/39c0ba1fae20488e29978a3b279b8ba61c405747/api/namex/resources/name_requests/name_requests.py#L42 @cors_preflight('GET, POST') is declared but maybe additional configuration like specifying headers and/or origins may fix this issue

@ozamani9gh

shaangill025 avatar Jul 02 '24 18:07 shaangill025

@shaangill025 do you feel comfortable making these code changes, or do you want to work with @eve-git on this ticket this week. i will leave it up to you. but move this back to IN PROGRESS till coding fixes have been applied.

ozamani9gh avatar Jul 02 '24 19:07 ozamani9gh

image.png

ozamani9gh avatar Jul 22 '24 17:07 ozamani9gh

image.png

ozamani9gh avatar Jul 22 '24 17:07 ozamani9gh

Mihai will update ticket with OPS ticket and the OPS Dev will investigate and reproduce.

ozamani9gh avatar Jul 25 '24 18:07 ozamani9gh