Git Product home page Git Product logo

pantera-digital / yii2-sberbank-pay Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 7.0 58 KB

Модуль позволяет организовать прием платежей через шлюз Сбербанка на вашем yii2-проекте. Если данный модуль вам пригодился, то нас можно отблагодарить, поставив репозиторию ⭐

License: Apache License 2.0

PHP 100.00%
billing php7 sberbank yii yii2 yii2-modules

yii2-sberbank-pay's People

Contributors

dven84 avatar nekrasoft avatar singletonn avatar webmayak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

yii2-sberbank-pay's Issues

Не могу понять, что это за свойство attributes модели Invoice, к которому вы обращаетесь в DefaultController.php

    /**
     * Сюда будет перенаправлен результат оплаты
     * @throws NotFoundHttpException
     * @throws \Exception
     * @throws \Throwable
     * @throws \yii\db\StaleObjectException
     */
    public function actionComplete()
    {
        /* @var $model Invoice */
        if (is_null(Yii::$app->request->get('orderId'))) {
            throw new NotFoundHttpException();
        }
        $model = Invoice::find()
            ->where([
                'AND',
                ['=', 'status', 'I'],
                ['=', 'orderId', Yii::$app->request->get('orderId')],
            ])
            ->one();
        if (is_null($model)) {
            throw new NotFoundHttpException();
        }
        $result = $this->module->sberbank->complete(Yii::$app->request->get('orderId'));
        //Проверяем статус оплаты если всё хорошо обновим инвойс и редерекним
        if (isset($result['OrderStatus']) && ($result['OrderStatus'] == $this->module->sberbank->classRegister->successStatus())) {
            $model->attributes = $this->module->sberbank->classRegister->getDataForUpdate();
            $model->update();
            if ($this->module->successCallback) {
                $callback = $this->module->successCallback;
                $callback($model);
            }
            $this->redirect($this->module->successUrl);
        } else {
            if ($this->module->failCallback) {
                $callback = $this->module->failCallback;
                $callback($model);
            }
            $this->redirect($this->module->failUrl);
        }
    }

В модели Invoice не вижу такого свойства, attributes.... (( Что это за "магическое" свойство такое?

Не срабатывает callback для генерации uniqid инвойса

Добрый день.
В callback idGenerator прописал правила для создания uniqid, но он не отрабатывает. Проверил, в models/Invoice->generateUniqid() на стр. 68 - Module::getInstance() всегда возвращает null, никогда не возвращает модуль.
В других местах, где вызывается тот же Module::getInstance(), модуль возвращается успешно.
Причем если заменить Module::getInstance() на Yii::$app->getModule('sberbank'), то модуль возвращается и, соответственно, callback idGenerator отрабатывает.
Вы с этим не сталкивались? Что может быть причиной?

Yii2 Advanced 2.0.34
PHP 7.2
Пробовал и на локальном ПК Windows 10 под OpenServer, и на хостинге под Linux

Trying to get property 'idGenerator' of non-object

Здравствуйте. Хотел использовать Ваше расширение yii2-sberbank-pay но при использовании вылезла такая ошибка

Trying to get property 'idGenerator' of non-object

Я так понимаю что в PHP 7.2 условие его определяет как объект а не переменню if ($module->idGenerator)
наверное надо заменить
if (!is_null(module->idGenerator))

Ошибка с миграцией

После выполнения команды

php yii migrate --migrationPath=@pantera/yii2/pay/sberbank/migrations

Получаю ошибку:

Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [1049] Unknown database 'yii2advanced''

Понятно что этой базы у меня просто нет, но вопрос зачем вообще эта команда? Какая база эй нужна и где настраивать подключение к ней. У меня шаблон advanced.

Так же общий вопрос по системе оплаты через Сбербанк. Мне нужно внедрить в приложение оплату, но конкретно у меня не заключен договор со Сбербанком и логина и пароля у меня нет. Но у людей которые будут разворачивать - есть.
В связи с этим существует ли какой - то тестовый режим для проверки оплаты и что необходимо будет выполнить конечному потребителю? просто прописать логин api мерчента и пароль?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.