Re: Fatal error: Class 'Omnipay\Omnipay' not found in /home/proj/public_html/pin_payment/index.php on li

704 views
Skip to first unread message
Message has been deleted

ict australia

unread,
Apr 11, 2014, 12:53:49 AM4/11/14
to omn...@googlegroups.com


On Friday, April 11, 2014 2:46:06 PM UTC+10, ict australia wrote:
Hello, 

I am getting Fatal error: Class 'Omnipay\Omnipay' not found in /home/proj/public_html/pin_payment/index.php on line 4 when processing Pin Payment script. Can you please check it once? I think there is some problem with Omni pay library file. All files are there.

Cheers,

Su

Adrian Macneil

unread,
Apr 11, 2014, 2:05:14 AM4/11/14
to ict australia, omn...@googlegroups.com
What code are you using?
--
You received this message because you are subscribed to the Google Groups "omnipay" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnipay+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adrian Macneil

unread,
Apr 11, 2014, 9:51:57 PM4/11/14
to omn...@googlegroups.com
You need to use composer to install Omnipay into your project. I've explained this in your duplicate post on Stack Overflow:



On 11 April 2014 19:34, ict australia <auss...@gmail.com> wrote:
Hi Adrian,

Thanks for the reply. I have attached the code herewith this e-mail. 

Cheers,

Su
--
Kind Regards,

Sudhir

Anthony Ogden

unread,
Sep 25, 2014, 7:11:13 AM9/25/14
to omn...@googlegroups.com
Hi,

I know you have answered this before but I get the same whenever I try to use the latest omnipay too.

I'm running PHP 5.5 on Ubuntu and I just get the cannot find 'Omnipay\Omnipay'.    I've installed using composer and I've included the autoloader.

The autoloader generated looks like this -

<?php

// autoload_psr4.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
    'Omnipay\\WorldPay\\' => array($vendorDir . '/omnipay/worldpay/src'),
    'Omnipay\\TwoCheckout\\' => array($vendorDir . '/omnipay/2checkout/src'),
    'Omnipay\\TargetPay\\' => array($vendorDir . '/omnipay/targetpay/src'),
    'Omnipay\\Stripe\\' => array($vendorDir . '/omnipay/stripe/src'),
    'Omnipay\\SecurePay\\' => array($vendorDir . '/omnipay/securepay/src'),
    'Omnipay\\SagePay\\' => array($vendorDir . '/omnipay/sagepay/src'),
    'Omnipay\\Pin\\' => array($vendorDir . '/omnipay/pin/src'),
    'Omnipay\\PaymentExpress\\' => array($vendorDir . '/omnipay/paymentexpress/src'),
    'Omnipay\\Payflow\\' => array($vendorDir . '/omnipay/payflow/src'),
    'Omnipay\\PayPal\\' => array($vendorDir . '/omnipay/paypal/src'),
    'Omnipay\\PayFast\\' => array($vendorDir . '/omnipay/payfast/src'),
    'Omnipay\\Netaxept\\' => array($vendorDir . '/omnipay/netaxept/src'),
    'Omnipay\\NetBanx\\' => array($vendorDir . '/omnipay/netbanx/src'),
    'Omnipay\\MultiSafepay\\' => array($vendorDir . '/omnipay/multisafepay/src'),
    'Omnipay\\Migs\\' => array($vendorDir . '/omnipay/migs/src'),
    'Omnipay\\Manual\\' => array($vendorDir . '/omnipay/manual/src'),
    'Omnipay\\GoCardless\\' => array($vendorDir . '/omnipay/gocardless/src'),
    'Omnipay\\FirstData\\' => array($vendorDir . '/omnipay/firstdata/src'),
    'Omnipay\\Eway\\' => array($vendorDir . '/omnipay/eway/src'),
    'Omnipay\\Dummy\\' => array($vendorDir . '/omnipay/dummy/src'),
    'Omnipay\\Coinbase\\' => array($vendorDir . '/omnipay/coinbase/src'),
    'Omnipay\\CardSave\\' => array($vendorDir . '/omnipay/cardsave/src'),
    'Omnipay\\Buckaroo\\' => array($vendorDir . '/omnipay/buckaroo/src'),
    'Omnipay\\AuthorizeNet\\' => array($vendorDir . '/omnipay/authorizenet/src'),
);

Kayla Daniels

unread,
Sep 26, 2014, 8:31:57 AM9/26/14
to omn...@googlegroups.com
Anthony, 

Which gateway are you using? I would highly recommend requiring that specific gateway in your composer.json, rather than requiring omnipay/omnipay, which will pull in all 30 of the gateways. That is, of course, unless you have a legitimate need for all of them. 

I know that doesn't answer your immediate question, but it's a tip that will help with the number of composer dependencies you're pulling in. 

As for the original question: can you post the code you're using? I just did a fresh install of omnipay to try to reproduce the error and I was unable to. 

Thanks!
Kayla Daniels

Anthony Ogden

unread,
Sep 26, 2014, 10:45:06 AM9/26/14
to omn...@googlegroups.com
Hi Kayla

Thanks for the response, I have since managed to get it working, not 100% sure what the issue was, but working ok now.  

I was using the WorldPay gateway, isn't really any documentation for its specifics but I've managed to get it to work after some digging around.

Anthony.
Reply all
Reply to author
Forward
0 new messages