简体   繁体   中英

pin payment error - vendor/autoload.php not found

I have installed composer on my pc and running a pin payment script.

require_once __DIR__.'/vendor/autoload.php';
use Omnipay\Common\GatewayFactory;
$gateway = GatewayFactory::create('Pin');
$gateway->setSecretKey('1111111111');
$gateway->purchase(array(
    'email'       => 'abc.php2@gmail.com',
    'description' => 'Widgets',
    'amount'      => '49.99',
    'currency'    => 'USD',
    'card_token'  => $_REQUEST['card_token'],
    'ip_address'  => $_REQUEST['ip_address']
))->send();

I am not sure about require_once _ DIR _.'/vendor/autoload.php'; , where can i find the exact path for the same.

I think as you as "but where do I find the vendor" that you did not run the composer install command.

You have to run it in order to create the vendor dorectory and download the packages. Find out more in the documentation : http://getcomposer.org/doc/00-intro.md#using-composer

Basically, run:

composer install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM