wildan99 / global-pay
GlobalPay bundle
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.2
- doctrine/annotations: ^1.13
- doctrine/doctrine-bundle: ^2.5
- doctrine/doctrine-migrations-bundle: ^3.2
- doctrine/orm: ^2.11
- ramsey/collection: *
- ramsey/uuid: *
- symfony/dotenv: ^7.0
- symfony/framework-bundle: ^7.0
- symfony/http-client: ^7.0
- symfony/validator: ^7.0
Requires (Dev)
- phpunit/phpunit: ^10
- psalm/plugin-symfony: ^5.1
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: *
- symfony/phpunit-bridge: ^7.0
- vimeo/psalm: *
- zircote/swagger-php: ^4.8
README
Installation
Install the package
composer req wildan99/global-pay
Add to config/bundles.php
Daniil\GlobalPayBundle\GlobalPayBundle::class => ['all' => true],
Copy routes
/vendor/wildan99/global-pay/config/routes/global_pay.yaml to config/routes/global_pay.yaml
Run in console
php bin/console doctrine:migrations:diff php bin/console doctrine:migrations:migrate --no-interaction
Add next lines to your .env file
###> GlobalPay ### GLOBAL_PAY_URL=<get it in GlobalPay> GLOBAL_PAY_AUTH_URL=<get it in GlobalPay> GLOBAL_PAY_SERVICE_ID=<get it in GlobalPay> GLOBAL_PAY_CLIENT_ID=<get it in GlobalPay> GLOBAL_PAY_GRANT_TYPE=<get it in GlobalPay> GLOBAL_PAY_SCOPE=<get it in GlobalPay> GLOBAL_PAY_CLIENT_SECRET=<get it in GlobalPay> GLOBAL_PAY_USERNAME=<get it in GlobalPay> GLOBAL_PAY_PASSWORD=<get it in GlobalPay> ###< GlobalPay ###
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\GlobalPayBundle\Service\Client $client) { } public function prepare(): void { $this->client->prepare(new PrepareRequest(shopTransactionId: 'test', sum: 1000, currency: Currency::UZS, description: '')) } }