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