Skip to content

خطای Trying to access array offset on value of type null هنگام اتصال به زرین پال #117

Description

@hamed-bolhasani

با سلام.

کد من هنگام اتصال به درگاه بانکی وقتی روی حالت سندباکس هستش بدون مشکل وصل میشه
ولی وقتی روی حالت نرمال میذارمش خطای بالا رو نشون میده

از این فایل vendor/shetabit/multipay/src/Drivers/Zarinpal/Strategies/Normal.php:104
و خط throw new PurchaseFailedException($result['errors']['message'], $result['errors']['code'])

 $result = json_decode($response->getBody()->getContents(), true);

        // some error has happened
        if (!empty($result['errors']) || empty($result['data']) || $result['data']['code'] != 100) {
            throw new PurchaseFailedException($result['errors']['message'], $result['errors']['code']);

        }

ما با استفاده از داکر پروژه رو میسازیم

php version: 7.4

RUN apt-get update &&
apt-get install -y libxml2-dev &&
docker-php-ext-install soap

RUN docker-php-ext-install soap

RUN composer install --no-scripts --no-autoloader --prefer-dist --no-dev
--working-dir=/var/www/html

RUN composer du
RUN mkdir -p ./bootstrap/cache/
RUN chmod -R 777 ./bootstrap/cache/

RUN composer dump-autoload
RUN php artisan cache:clear
RUN php artisan config:clear
RUN php artisan view:clear
RUN php artisan route:clear

اینا رو داخل داکر گذاشتیم

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions