Encrypt Payment Gatway Configuration
- Create a new file in the root of your project and name it
encrypt.php
.
<?php
use Defuse\Crypto\Key;
require_once 'vendor/autoload.php';
var_dump(Key::createNewRandomKey()->saveToAsciiSafeString());
- Store your key in a safe place and add it to your
.env
file.
CORESHOP_PAYUM_ENCRYPT_KEY="YOUR KEY"
- Add the following code to your
config/config.yaml
file.
payum:
dynamic_gateways:
encryption:
defuse_secret_key: "%env(CORESHOP_PAYUM_ENCRYPT_KEY)%"
- Existing payment gateway configs will be automatically encrypted when updated. New payment gateway configs will be encrypted by default.