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

Error request nothing works php 8.0 #262

Open
avatec opened this issue Nov 22, 2022 · 1 comment
Open

Error request nothing works php 8.0 #262

avatec opened this issue Nov 22, 2022 · 1 comment

Comments

@avatec
Copy link

avatec commented Nov 22, 2022

Hi,

May someone help ? I'm using php 8.0 on docker alpine version. Composer includes:

"league/omnipay": "^3.2",
"omnipay/paypal": "^3.0"

When i run my code i see this typeerror message:
Symfony\Component\HttpFoundation\Request::createRequestFromFactory(): Argument #2 ($request) must be of type array, null given, called in /var/www/html/vendor/symfony/http-foundation/Request.php on line 306

Heres how i run code:
$gateway = Omnipay::create('PayPal_Rest');
$gateway->setClientId( $this->config['paypal_client_id'] );
$gateway->setSecret( $this->config['paypal_secret'] );
$gateway->setTestMode( (!empty( $this->config['paypal_testmode']) ? true : false) );

Errors show on Omnipay::create

the same code works ok on server with php 7.2 so i was wondering if i made some mistake here - and i need to include httpclient or something. Please help me.

@avatec
Copy link
Author

avatec commented Nov 22, 2022

I found that problem was in my request.php class. Closing

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

1 participant