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 after clean install #7

Open
yairpe opened this issue Jun 27, 2021 · 3 comments
Open

Fatal error after clean install #7

yairpe opened this issue Jun 27, 2021 · 3 comments

Comments

@yairpe
Copy link

yairpe commented Jun 27, 2021

Installed as described.
Selected Create New Payment and clicked Pay

Received a stack dump:
Fatal error: Uncaught TypeError: Argument 1 passed to Cardinity\Method\ResultObjectMapper::map() must be of the type array, null given, called in C:\Apache24\htdocs\test\cardinity\vendor\cardinity\cardinity-sdk-php\src\Http\Guzzle\ExceptionMapper.php on line 84 and defined in C:\Apache24\htdocs\test\cardinity\vendor\cardinity\cardinity-sdk-php\src\Method\ResultObjectMapper.php:38 Stack trace: #0 C:\Apache24\htdocs\test\cardinity\vendor\cardinity\cardinity-sdk-php\src\Http\Guzzle\ExceptionMapper.php(84): Cardinity\Method\ResultObjectMapper->map(NULL, Object(Cardinity\Method\Error)) #1 C:\Apache24\htdocs\test\cardinity\vendor\cardinity\cardinity-sdk-php\src\Http\Guzzle\ExceptionMapper.php(34): Cardinity\Http\Guzzle\ExceptionMapper->create('Cardinity\\Excep...', Object(GuzzleHttp\Exception\ClientException), Object(Cardinity\Method\Payment\Create)) #2 C:\Apache24\htdocs\test\cardinity\vendor\cardinity\cardinity-sdk-php\src\Http\Guzzle\ClientAdapter.php(53): Cardinity\Http\Guzzle\ExceptionMapper->get(Object(GuzzleHttp\Exceptio in C:\Apache24\htdocs\test\cardinity\vendor\cardinity\cardinity-sdk-php\src\Method\ResultObjectMapper.php on line 38

@shababcardinity
Copy link
Contributor

Can you share your php version, Was the .env file configured correctly?

@shababcardinity
Copy link
Contributor

shababcardinity commented Jun 28, 2021

You are probably using from a localhost. Requests from localhost or 127.0.0.1 is rejected by the server.
In case of a local development environment you have these options -

  1. use your computer IP address instead.
  2. use something like ngrok
  3. or have a development url using etc/hosts.

@yairpe
Copy link
Author

yairpe commented Jul 11, 2021

after updating code and composer and following the instructions, I get an error

Fatal error: Uncaught Error: Class 'Router' not found in C:\Apache24\htdocs\apps\spilnew\public_html\test\cardinity\cardinity-example-php-master\public\index.php:20 Stack trace: #0 {main} thrown in C:\Apache24\htdocs\apps\spilnew\public_html\test\cardinity\cardinity-example-php-master\public\index.php on line 20

(.env file has the correct values. php 7.4)

seems like a namespace issue.

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