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

Laravel 8 is not supported? #906

Open
sergiocasquejo opened this issue Apr 30, 2021 · 4 comments
Open

Laravel 8 is not supported? #906

sergiocasquejo opened this issue Apr 30, 2021 · 4 comments
Labels

Comments

@sergiocasquejo
Copy link

I tried installing in laravel 8 but I think it's not supported yet?

@pierredup
Copy link
Member

@sergiocasquejo Laraval 8 should be supported (Payum/PayumLaravelPackage#53). Are there any specific errors you are getting or something not working as expected?

@sergiocasquejo
Copy link
Author

This is what i get when I install the package.

Your requirements could not be resolved to an installable set of packages.

Problem 1
- payum/payum-laravel-package[dev-master, 1.0.5] require payum/core ^1 -> satisfiable by payum/core[1.0.0-BETA1, ..., 1.6.x-dev (alias of dev-master)].
- payum/core 1.6.x-dev is an alias of payum/core dev-master and thus requires it to be installed too.
- payum/payum-laravel-package[1.0.0-BETA1, ..., 1.0.0] require illuminate/container ~4.0|~5.1 -> found illuminate/container[v4.0.0-BETA2, ..., 4.2.x-dev, v5.1.1, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
- payum/payum-laravel-package[1.0.1, ..., 1.0.4] require illuminate/container ^4|^5.1 -> found illuminate/container[v4.0.0-BETA2, ..., 4.2.x-dev, v5.1.1, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
- payum/core[dev-master, 1.3.0, ..., 1.6.x-dev] require php-http/client-implementation ^1.0 -> could not be found in any version, but the following packages provide it:
- symfony/http-client Provides powerful methods to fetch HTTP resources synchronously or asynchronously

@pierredup
Copy link
Member

I think the issue is missing a php-http/client-implementation package. The following should work:

composer require payum/payum-laravel-package guzzlehttp/guzzle:^6.0 php-http/guzzle6-adapter

Note: Guzzle 7 support is currently in master, and not yet in a tagged release. So you need to use Guzzle 6 for now. Once Payum 1.7 is released, then you should be able to use Guzzle 7.

@sergiocasquejo
Copy link
Author

sergiocasquejo commented May 3, 2021

All good. but can you help me with express checkout capture? it redirect to 404 Page not found this is the url
/payment/capture/v34pxvlYS0WttAkWV0AAXVNzvLJFmWpp_MpRtb3MGOA
and this is the method in controller

public function prepareExpressCheckout()
    {
        $storage = $this->getPayum()->getStorage(Payment::class);
        $payment = $storage->create();
        $payment->setNumber(uniqid());
        $payment->setCurrencyCode('USD');
        $payment->setTotalAmount(123); // 1.23 USD
        $payment->setDescription('A description');
        $payment->setClientId(2);
        $payment->setClientEmail('[email protected]');
        $payment->setDetails(array(
        // put here any fields in a gateway format.
        // for example if you use Paypal ExpressCheckout you can define a description of the first item:
        // 'L_PAYMENTREQUEST_0_DESC0' => 'A desc',
            'PAYMENTREQUEST_0_CURRENCYCODE' => 'USD',
            'PAYMENTREQUEST_0_AMT' => 1.23
        ));
        $storage->update($payment);

        $captureToken = $this->getPayum()->getTokenFactory()->createCaptureToken('paypal_ec', $payment, 'payment_done_order');

        return \Redirect::to($captureToken->getTargetUrl());
    }

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

No branches or pull requests

2 participants