coinbase / coinbase-commerce-php

Coinbase Commerce PHP
MIT License
136 stars 156 forks source link

Using on Windows #37

Closed Asmitta-01 closed 3 years ago

Asmitta-01 commented 3 years ago

I am on windows and i started using the package directly(put on my project directory). I wrote this:

require_once './coinbase-commerce-php-master/src/ApiClient.php';
require_once './coinbase-commerce-php-master/src/Resources/ApiResource.php';
require_once './coinbase-commerce-php-master/src/Resources/ResourcePathInterface.php';
require_once './coinbase-commerce-php-master/src/Resources/Charge.php';

use CoinbaseCommerce\ApiClient;
use CoinbaseCommerce\Resources\Charge;

But i get an error that i couldn't resolve: Fatal error: Trait 'CoinbaseCommerce\Resources\Operations\CreateMethodTrait' not found in ...

I left it and i install Composer and the package but it but i don't know what to put in _requireonce now. require_once __DIR__ . "/vendor/autoload.php"; doesn't work because i'm on Windows

Asmitta-01 commented 3 years ago

I have been looking autoload.php for a while and i found it. Writing this solve my problem:

require_once "C:/Users/MyUserName/vendor/autoload.php";