PHPackages                             kevinkopf/finik-kg-symfony-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. kevinkopf/finik-kg-symfony-bundle

ActiveSymfony-bundle[Payment Processing](/categories/payments)

kevinkopf/finik-kg-symfony-bundle
=================================

This is the Symfony bundle to integrate Finik.kg payment system into your application.

v0.0.0(10mo ago)0438↓84.6%MITPHPPHP &gt;=8.0

Since Aug 23Pushed 10mo agoCompare

[ Source](https://github.com/kevinkopf/finik-kg-symfony-bundle)[ Packagist](https://packagist.org/packages/kevinkopf/finik-kg-symfony-bundle)[ RSS](/packages/kevinkopf-finik-kg-symfony-bundle/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

finik-kg-symfony-bundle
=======================

[](#finik-kg-symfony-bundle)

> WARNING! This package is not yet ready for production usage!

This is the Symfony bundle to integrate Finik.kg into your application.

Installation
============

[](#installation)

To install the bundle, you can use Composer. Run the following command in your terminal:

```
composer require kevinkopf/finik-kg-symfony-bundle
```

Make sure to enable the bundle in your bundles.php file:

```
// config/bundles.php
return [
    // ...
    KevinKopf\FinikKgPaymentBundle\FinikKgPaymentBundle::class => ['all' => true],
];
```

Usage
=====

[](#usage)

### Configuration

[](#configuration)

To configure the bundle, you need to add the following configuration to your `config/packages/finik_kg_payment.yaml` file:

```
finik_kg_payment:
  secret_key: '%env(resolve:FINIK_KG_SECRET_KEY)%'
  public_key: '%env(resolve:FINIK_KG_PUBLIC_KEY)%'
  pass_phrase: '%env(FINIK_KG_PASSPHRASE)%'
  api_key: '%env(FINIK_KG_API_KEY)%'
  base_url: '%env(FINIK_KG_BASE_URL)%'
  redirect_url: '%env(FINIK_KG_REDIRECT_URL)%'
  account_id: '%env(FINIK_KG_ACCOUNT_ID)%'
  merchant_code: '%env(FINIK_KG_MERCHANT_CODE)%'
```

Note that the values are pointing to environmental variables. So either set up the `.env` (or the `.env.local`) file or set it in the environment directly. It's up to you.

### Generating your RSA keys

[](#generating-your-rsa-keys)

Before you can use Finik.kg, you need to generate your RSA keys. You can do this using the following command:

```
php bin/console finik:generate-keys
```

If you already have a key pair, the command will fail. You may use the `--overwrite` flag to overwrite the existing keys.

### Generating the payment link

[](#generating-the-payment-link)

You will need to create a `Payment` and use it in `PaymentManager`. The `Payment` needs a UUID4 for `paymentId` argument. You may use [ramsey/uuid](https://packagist.org/packages/ramsey/uuid) for this.

```
