2

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'       => '[email protected]',
    '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.

2
  • Do you have the directory vendor? If not you have to run composer install first. Jan 3, 2014 at 10:15
  • i have installed composer but where do I find the vendor.
    – user930026
    Jan 3, 2014 at 10:16

1 Answer 1

4

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
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.