-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 error #409
Comments
I find adding it to the namespaces explicitly fixes this, e.g.: I haven't had time to dig into the class or SDK and figure out exactly why yet. May also affect ARB types, not sure. Good luck! |
I tried to use |
I'm just a dev trying to help you out here. I mis-read your original issue, the advice I gave relates to if your IDE is showing a "unknown type" error for the merchauth object. For the 3 apps I have set up using the SDK, my structure looks like this: |app-root| The autoload, classmap, LICENSE files and lib directory are copied from a clone of the SDK repo as of v2.0.0 (when external package dependencies were removed). The vendor directory was creating by using composer for earlier installs (pre v2.0.0.0) and it has separate autoloader files that composer installed. If you are installing without composer, I see in the installation instructions it says: Custom SPL Autoloader require 'path/to/anet_php_sdk/autoload.php'; That would seem to indicate to me that you are missing files that composer installs in the vendor directory. I'd suggest installing with composer to recreate that file structure, then moving that to your server. Also note that, at least in my example, the SDK lib and vendor directories are outside of the web root. So in my files when I require the "vendor/autoload.php" that path is from the server root, not the web root. Good luck! |
I installed with composer to recreate that file structure, and I copied it to my server. |
I tried to use php sdk without composer like this way
require '/sdk-php-master/autoload.php';
use net\authorize\api\contract\v1 as AnetAPI;
use net\authorize\api\controller as AnetController;
But when I use
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
I am getting 404 error. How can I resolve it?
The text was updated successfully, but these errors were encountered: