wildan99 / octo-bundle
Octo bundle
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.2
- ramsey/collection: *
- symfony/framework-bundle: ^6.2
- symfony/http-client: ^6.2
Requires (Dev)
- roave/security-advisories: dev-latest
README
Installation
Install the package
composer req wildan99/octo-bundle
Add to config/bundles.php
Daniil\OctoBundle\OctoBundle::class => ['all' => true],
Add next lines to your .env file
###> octo ### OCTO_SHOP_ID=<get it in OCTO> OCTO_SECRET=<get it in OCTO> OCTO_NOTIFY_URL= OCTO_RETURN_URL= OCTO_TEST=true OCTO_AUTO_CAPTURE=true ###< octo ###
How to use
You need to use this service in construct method of class
Example of simple using
class MyClass { public function __construct(private \Daniil\OctoBundle\Service\Client $client) { } public function prepare(): void { $this->client->prepare(new PrepareRequest(shopTransactionId: 'test', sum: 1000, currency: Currency::UZS, description: '')) } }