CommerceWeavers / SyliusTpayPlugin

MIT License
0 stars 1 forks source link

Provide better way to handle TPay Logs #8

Open jakubtobiasz opened 1 month ago

jakubtobiasz commented 1 month ago

Currently we have a hardcoded path for Tpay logs directory. The place where we're setting it is ok (it's invoked before calling the Tpay API), but we might consider also putting it in the gateway factory right before the return statement https://github.com/CommerceWeavers/SyliusTPayPlugin/blob/d6fe3ad8923cab1393132ffae87d15e56609c490/src/Payum/Factory/TpayGatewayFactory.php#L32.

The second one might be simpler, as going the first way forces us to pass the log directory path to every \CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\BaseApiAwareAction-based service.

Once we decide where it should lay, then we need to inject the path. The path might come from:

Personally, I prefer the first one.

Ref: