After calling payment web-sdk from react (with and without(!) wrapper), the deverloper console in chrome shows for every output square.js:1 as the line number - all following messages show this as line number. Even if the message is printed from MY code completely outside from square code and even after closing the payments.
console.log("Loading Payments")
let instance = await payments(appId);
if (instance == null) {
//throw new Error('Square Web Payments SDK failed to load');
console.log("Loading Payments FAILED with instance null");
return;
}
console.log("Loading Payments successful");
The issue is that the real line numbers are NOT shown anymore in my code.
“Loading Payment successful” was printed by a different file name actually:
SquareForm.js:69
Jet the square sdk seems to redirect all console messages from my react application
to square which is NOT OK.
There was no exception as in your post. everything works fine. Can that be fixed?
I don’t think I will use square if the sdk does that to my applicaiton.
I am not using the React Web Payment SDK. I am using directly your Web-SDK and wrapped it myself, assuming the issue was with Seeds react API. But the issue is with Square’s Web-SDK not the react wrapper.
Actually I found a work around to save the old console.log and reasign it after running the Web-SDK code. But that is really a hack. You need to fix that in your API.