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

خطا در درگاه بانک پارسیان #87

Closed
ehsannowrouzi opened this issue Nov 9, 2017 · 10 comments
Closed

خطا در درگاه بانک پارسیان #87

ehsannowrouzi opened this issue Nov 9, 2017 · 10 comments

Comments

@ehsannowrouzi
Copy link

ehsannowrouzi commented Nov 9, 2017

سلام ، درگاه پارسیان رو می خوام راه اندازی کنم ، پین ست شده و آی پی معتبر هست. پیغام زیر میاد :
Server was unable to read request. ---> There is an error in XML document (2, 260). ---> Value was either too large or too small for an Int32.
علت چی هست و چه باید کرد ؟ در مورد بانک ملت به درستی کار می کنه همه چیز .
ممنون میشم پاسخ بدید.

@kamiyar
Copy link

kamiyar commented Nov 10, 2017

سلام
اگر امکان هست نمونه کد خودتون رو برای بررسی قرار بدین؟

@ehsannowrouzi
Copy link
Author

if($data['bankmethod']=='parsian'){
try {

            $gateway = Gateway::make(new Parsian());
            // $gateway->setCallback(url('/path/to/calback/route')); You can also change the callback
            $gateway->price($payableprice)->ready();
            $refId =  $gateway->refId();
            $transID = $gateway->transactionId();


            // Your code here

            return $gateway->redirect();


        } catch (Exception $e) {

            echo $e->getMessage();
        }
    }

CallbackUrl tooye config file set shodeh & payableprice ham meghdar dare.

@kamiyar
Copy link

kamiyar commented Nov 10, 2017

من فکر میکنم مشکل از مقدار مبلغ هست. مجدد ساختار تولید اون رو بررسی کنین. و یک بار با مقدار دهی مستقیم مثلا 1000 تومان چک کنین؟

@ehsannowrouzi
Copy link
Author

ehsannowrouzi commented Nov 10, 2017

خیر ، مقدار دهی چه به صورت مستقیم و چه با متغیر همین ارور رو میده ، توی تصویر مشخص هست که قیمت رو داره میگیره مقدارش رو. تصویر ضمیمه شده رو ممنون میشم یه نگاه بندازید.

@kamiyar
Copy link

kamiyar commented Nov 10, 2017

order Id رو خودتون می سازین؟ شاید مشکل از بزرگی اون هست؟

@ehsannowrouzi
Copy link
Author

kheir , tooye classe Parsian , tabei hast be name sendPayRequest() , orderid yeki az parametrhaei hast ke tavassote function PinPaymentRequest samte bank ferestade mishe. albate orderid ro dare barabar ba transactionid gharar mideh khodesh be towre automatic , hame chiz dar banke mellat moshtarak hast va dorost kar mikone , amma moteassefane harchi hast az samte banke parsian hast ke ehtemalan parametr haei ba in format ro nemipazire. albate in chizi hast ke man fekr mikonam , motmaen nistam.

@ehsannowrouzi
Copy link
Author

به نکته خیلی خوبی اشاره کردین ، این عدد توی محدوده Int32 نبود ، به صورت دستی مقدار دهی کردم و درست شد ، پس کد باید دستکاری بشه و این باگ فیکس بشه. به نظرتون چی بگذاریم ؟ آیا این عدد می تونه یک عدد رندوم باشه ؟

@hpakdaman
Copy link
Contributor

ما شماره تراکنش رو
bigInt
قرار دادیم .
از این نمیتونه باشه آیا ؟‌

@akoSalman
Copy link
Contributor

@hpakdaman Absolutely the problem is with transactionId, now it has a length of 12, but it must be in the range of int32 length, setting it's length to 9 will solve the problem.

@hpakdaman
Copy link
Contributor

There are two fields should be type of BIGINT , one of them is the primary key field (id) exists in gateway_transactions table and another is the foreign key field (transaction_id) exists in gateway_transactions _logs table, check both and change them to BIGINT data type by hand and the problem will be fixed , finish .

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

4 participants