Global Payments Hosted Fields won't display on Blazor Web Assembly app unless a page Refresh

huangapple go评论127阅读模式
英文:

Global Payments Hosted Fields won't display on Blazor Web Assembly app unless a page Refresh

问题

我必须使用Global Payments的Hosted Fields解决方案。我在index.html中包括javascript文件,并在razor页面中添加div。我在razor页面的OnAfterRenderAsync中调用JS Interop,配置和调用cardform的创建。但是,Hosted Fields不会显示,除非我进行刷新或后退然后前进,或者如果我使用开发者工具来检查,然后字段会显示。

我尝试重新加载窗口,但目前只能接受页面的一闪而过。我尝试将其移动到一个单独的组件,并设置一个虚拟字段以强制状态更改。我尝试重新加载、刷新、重置整个表单,什么都没用。只有在按下F5或返回到上一页再进入页面或打开开发者工具并检查时才会显示。我期望看到Hosted Fields。

奇怪的是,我在.Net Maui Blazor Hybrid中使用相同的Razor类库,它能正常工作,但如果我在Blazor Web Assembly中使用,它不起作用。

英文:

I am required to use the Hosted Fields solution from Global Payments. I include the javascript file in index.html and add the div's to the razor page. I make a call to JS Interop from the OnAfterRenderAsync in the razor page which configures and calls the cardform creation. However, the Hosted Fields don't display unless I do a Refresh or back button then forward or if I use developer tools to inspect, then the fields display.

I tried reloading the window, I'll take a flicker at this point. I have tried moving it to a separate component and setting a dummy field to force a state change. I have tried reload, refresh, reset the entire form, nothing. It only displays if I press F5 or go back a page and go into the page again or if I go to Developer Tools and Inspect. I expected to see the Hosted Fields.

What is strange is that I use this same Razor Class Library in .Net Maui Blazor Hybrid and it works fine, but if I use in the Blazor Web Assembly it doesn't work correctly.

答案1

得分: 1

Blazor WASM 无法从 IFrame 中加载 LocalStorage 或 IndexedDB #44587

英文:

Blazor WASM not load LocalStorage or IndexedDB from IFrame #44587

huangapple
  • 本文由 发表于 2023年4月7日 03:40:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/75953201.html
  • global-payments-api
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定