Closed Telarin closed 4 years ago
Hi @Telarin sorry for the delay here. It sounds like it's a security issue related to your server. Doing some searches, it sounds like it might be something around permissions/trusting around network like intranet, but that's out of my domain unfortunately.
As a test, can you do any Square API calls? Ie even a simple ListLocations
or anything? Or do they all fail?
Just wanted to reply for completeness, in case anyone else has this issue. Godaddy sets applications to medium trust by default, so the Square Connect SDK cannot communicate out. Was resolved by adding
<trust level="Full"
to the system.web section of my web.config so that it runs in full trust mode.
So I'm working on rewriting my checkout code to move from the old 2.10 version to the most recent. I have rewritten everything, converting the C# sample to VB.Net as best as I can, but am receiving an odd exception when I call CreatePayment:
Error calling CreatePayment: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I believe my payment code to be correct, and fairly straightforward. I will post a simplified version (error handling removed for clarity):
Am I missing something obvious? Is this perhaps some kind of issue with the configuration of the server environment? Using GoDaddy for hosting.