.NET 7.0 ASP.NET Core: PayPal integration (Visual Studio 2022)

In one of my new projects I had to integrate PayPal as payment provider. I started with the implementation and I used the plain V2 REST-API calls like Create Order. Everything's works fine and the implementation regarding the PayPal integration guide Set up standard payments was very easy to follow. But then - during my first web browser tests - I encountered an strange behavior. When I tried to open the PayPal payment dialog I saw a lot of errors in the Browser console:
[Bug] "Unable to delegate rendering... Error: No ack for postMessage " issue · Issue #1332 · paypal/paypal-checkout-components (github.com)
.net - Failed to launch debug adapter: VS tries to connect to a random port - Stack Overflow
Error: Unable to delegate rendering. Possibly the component is not loaded in the target window.
Error: No ack for postMessage getDelegateOverrides() in https://www.sandbox.paypal.com in 10000ms  
at https://www.paypal.com/sdk/js?client-id=XXXFR&currency=EUR:2:91459
at https://www.paypal.com/sdk/js?client-id=XXXXXXX&currency=EUR:2:32824
Very frustrating... I double checked my code on client and server and I was not able to find any issue.
With my test cases I validated and verified my server code - no errors or problems here. Then I started my project without any debugger attached and I was able to complete the payment process without any issues. After that I disabled the JavaScript debugger in Visual Studio 2022:



Then I tried the process again and the problem was gone! Happy coding again :-)

Kommentare

Beliebte Posts aus diesem Blog

Exchange Online: Schutzregel für E-Mail Weiterleitung

Vertikaler Bereich deaktiviert

Power Automate: Abrufen von SharePoint Listenelementen mit ODATA-Filter