Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught Error: Call to undefined method Payum\PayumModule\Registry\ServiceLocatorAwareRegistry::getStorage() #28

Closed
bMahadevan opened this issue Jun 5, 2016 · 4 comments

Comments

@bMahadevan
Copy link

bMahadevan commented Jun 5, 2016

I followed your doc to do the implementation but getting the undefined method error.

composer require "payum/payum-module:*@stable" "payum/paypal-express-checkout-nvp:*@stable" "payum/omnipay-bridge:*@stable"

config

use Payum\Core\Storage\FilesystemStorage;
use Payum\Paypal\ExpressCheckout\Nvp\PaypalExpressCheckoutGatewayFactory;
use Payum\Stripe\StripeJsGatewayFactory;
use Payum\OmnipayBridge\OmnipayGatewayFactory;

$paypalFactory = new PaypalExpressCheckoutGatewayFactory();
$omnipayFactory = new OmnipayGatewayFactory();

return array(
    'payum' => array(
        'token_storage' => new FilesystemStorage(
            __DIR__.'/../../data/payment',
            'App\Model\PaymentSecurityToken',
            'hash'
        ),
        'payments' => array(
            'paypal_ec' => $paypalFactory->create(array(
                'username' => 'xxx',
                'password' => 'xxx',
                'signature' => 'Axxx',
                'sandbox' => true
            )),
            'stripe_via_omnipay' => $omnipayFactory->create([
                'type' => 'Stripe',
                'apiKey' => 'dfdfd',
                'testMode' => true,
            ]),
        ),
        'storages' => array(
            'Matchmaker\Model\PaymentDetails' => new FilesystemStorage(
                __DIR__.'/../../data/payment',
                'App\Model\PaymentDetails',
                'id'
            )
        ),
    ),
);

if the payments is changed to gateways 'payum' could not be instantiated exception thrown.

Controller:
$storage = $this->getServiceLocator()->get('payum')->getStorage('Matchmaker\Model\PaymentDetails');

I am not sure PayumModule is still working with your stable code. Can you take a look at doc and guide me to fix the issue.

Thank you,

@makasim
Copy link
Member

makasim commented Jun 5, 2016

PayumModule 0.15 works with Payum/Core 0.15. It was never tested with 1.x and newer and most likely does not work with it, I am completely sure it does not.

So you have to:

@bMahadevan
Copy link
Author

Thank you. That worked. I have issues with payum/omnipay-bridge now. It's getting invalid API key error. I'll debug that.

@makasim
Copy link
Member

makasim commented Jun 6, 2016

What omnipay bridge are you trying to use?

@bMahadevan
Copy link
Author

sorry missed your message. it's working now. I hope I had a wrong version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants