문제

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top