{"id":14966888,"url":"https://github.com/dmitriymikheev/yii2-odysseq","last_synced_at":"2026-02-03T23:02:55.572Z","repository":{"id":56970208,"uuid":"328373213","full_name":"dmitriymikheev/yii2-odysseq","owner":"dmitriymikheev","description":"Yii2 extension for working with the Odysseq service.","archived":false,"fork":false,"pushed_at":"2022-09-14T11:54:39.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T16:11:23.170Z","etag":null,"topics":["composer","odysseq","payment","php","yii2"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmitriymikheev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-10T12:03:32.000Z","updated_at":"2021-12-24T17:55:06.000Z","dependencies_parsed_at":"2022-08-21T10:50:47.524Z","dependency_job_id":null,"html_url":"https://github.com/dmitriymikheev/yii2-odysseq","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dmitriymikheev/yii2-odysseq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriymikheev%2Fyii2-odysseq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriymikheev%2Fyii2-odysseq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriymikheev%2Fyii2-odysseq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriymikheev%2Fyii2-odysseq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitriymikheev","download_url":"https://codeload.github.com/dmitriymikheev/yii2-odysseq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriymikheev%2Fyii2-odysseq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29060635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T22:28:58.191Z","status":"ssl_error","status_checked_at":"2026-02-03T22:28:56.515Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","odysseq","payment","php","yii2"],"created_at":"2024-09-24T13:37:06.178Z","updated_at":"2026-02-03T23:02:55.558Z","avatar_url":"https://github.com/dmitriymikheev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yii2 Odysseq\n***\nExtension for working with the Odysseq service\n\n## Official API documentation\n***\nhttps://odysseq.com/api\n\n## Installation\n***\nThe preferred way to install this extension is through [composer](https://getcomposer.org/download/).\n\nEither run\n\n```bash\ncomposer require --prefer-dist dmitriymikheev/yii2-odysseq \"*\"\n```\n\nor add\n\n```\n\"dmitriymikheev/yii2-odysseq\": \"*\"\n```\n\nto the require section of your `composer.json` file.\n\n## Usage\n***\nAdd the component to your application config file.\n\n```php\nreturn [\n    //some config code\n    'components' =\u003e [\n        'odysseq' =\u003e [\n            'class' =\u003e 'dmitriymikheev\\odysseq\\OdysseqComponent',\n            'access_token' =\u003e 'your_access_token',\n            'notification_secret_key' =\u003e 'your_notification_secret_key',\n        ],\n    ]\n    //some config code\n];\n```\n\nTo configure notifications about a change in the status of the bid, add the following code in your controller:\n\n*1. Add an action:*\n\n```php\npublic function actions()\n{\n    return [\n        'odysseq-callback' =\u003e [\n            'class' =\u003e \\dmitriymikheev\\odysseq\\actions\\CallbackAction::class,\n            'callback' =\u003e [$this, 'successCallback'],\n            'component_id' =\u003e 'odysseq' //component id that was specified in the config file\n        ]\n    ];\n}\n```\n\n*2. Add VerbFilter:*\n\n```php\npublic function behaviors()\n{\n    return [\n        'verbs' =\u003e [\n            'class' =\u003e VerbFilter::className(),\n            'actions' =\u003e [\n                'odysseq-callback' =\u003e ['post'],\n            ],\n        ],\n    ];\n}\n```\n\n*3. Disable csrf validation for callback action like this:*\n\n```php\npublic function beforeAction($action)\n{\n    if ($action-\u003eid == 'odysseq-callback') {\n        $this-\u003eenableCsrfValidation = false;\n    }\n    return parent::beforeAction($action);\n}\n```\n\n*4. Add a callback function to your controller. It will be called if the request is not fake.*\n\n`$model` properties:\n* orderId - id of the bid in the partner's system\n* type - operation type (IN | OUT)\n* amount - transaction amount\n* status - operation status (WAITING | SENDING | SUCCESS | CANCELED)\n* errorCode - error code\n* errorMessage - error message\n\n```php\npublic function successCallback($model)\n{\n    //here you can change the status of the bid in your database\n    \n    //Remember that to inform the service about the successful processing of the notification, please return a json response {\"status\": 200}\n    //Example:\n    $response = Yii::$app-\u003egetResponse();\n    $response-\u003eformat = yii\\web\\Response::FORMAT_JSON;\n    $response-\u003edata = ['status' =\u003e 200];\n    return $response-\u003esend();\n}\n```\n\n## Available public methods\n\nMethod | Description\n-------|------------\nvalidateSignature($hash, $data) | Signature validation\nmakeReceiveRequest($order_id, $amount, $card_tail = null, $client_ip = null) | Initializing a request for a deposit. https://odysseq.com/api#payment-receive\nmakeContactRequest($order_id, $amount, $first_name, $middle_name, $last_name, $card_number) | Initiating a request for a deposit through the contact system. https://odysseq.com/api#payment-contact\ngetPaymentStatus($order_id) | Obtaining information about the bid. https://odysseq.com/api#payment-status\nmakeCancelRequest($order_id) | Cancellation of the payment request. Cancellation is available for bids in the initial WAITING status. https://odysseq.com/api#payment-cancel\nmakeSendRequest($order_id, $amount, $receiver) | Initialization of sending funds to the client's card or wallet. https://odysseq.com/api#payment-send\ngetAccountBalance() | Getting partner balance. https://odysseq.com/api#account-balance\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriymikheev%2Fyii2-odysseq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitriymikheev%2Fyii2-odysseq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriymikheev%2Fyii2-odysseq/lists"}