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

Undefined index: Status #49

Open
Milad-jfr opened this issue Apr 23, 2024 · 0 comments
Open

Undefined index: Status #49

Milad-jfr opened this issue Apr 23, 2024 · 0 comments

Comments

@Milad-jfr
Copy link

Milad-jfr commented Apr 23, 2024

اخیرا هنگام بازگشت ناموفق از درگاه ( مثلا حالت انصراف ) تو قسمت وریفای پیام خطای :
"Undefined index: Status"
تصویر کامل از پیام خطا در این تیکت پیوست شده .
Undefined index Status2

فعلا در حالت پرداخت موفق مشکلی نیست .
به نظر میاد این پیام خطا به دلیل تغییرات جدیدی در فرمت داده هایی باشه که از درگاه ارسال میشه .
و هنگام پرداخت ناموفق کد پکیج مقدار
status
رو خالی بر میگردونه

به عنوان راه حل موقت این کارو انجام دادم :
تو فایل :
/vendor/zarinpal/zarinpal/src/Drivers/RestDriver.php
خط 89
تو قسمت تابع
public function verifyWithExtra($inputs)
بعد از

$result = $this->restCall('PaymentVerificationWithExtra.json', $inputs);

این تیکه کدو به اولش اضافه کردم :

	if ( empty($result['Status']) ) {
        return [
                'Status'    => 'error',
                'error'     => !empty($result['Status']) ? $result['Status'] : null,
                'errorInfo' => !empty($result['errors']) ? $result['errors'] : null,
            ];
        }
@Milad-jfr Milad-jfr changed the title پیام خطا هنگام بازگشت از درگاه Undefined index: Status Apr 23, 2024
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