简体   繁体   English

固定付款错误-找不到vendor / autoload.php

[英]pin payment error - vendor/autoload.php not found

I have installed composer on my pc and running a pin payment script. 我已经在我的电脑上安装了composer并运行了Pin付款脚本。

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'; 我不确定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. 我以为您是“但是我在哪里可以找到供应商”, 您没有运行composer install命令。

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 在文档中找到更多信息http : //getcomposer.org/doc/00-intro.md#using-composer

Basically, run: 基本上,运行:

composer install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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