services:

  worldlineop.sdk.client.factory:
    class: 'WorldlineOP\PrestaShop\Sdk\ClientFactory'
    public: true
    arguments:
      - '@worldlineop.sdk.communicator'
      - '@worldlineop.settings'

  worldlineop.sdk.client:
    class: 'WorldlineOP\PrestaShop\Sdk\ClientFactory'
    public: true
    arguments:
      - '@worldlineop.sdk.communicator'
      - '@worldlineop.settings'
    factory: ['@worldlineop.sdk.client.factory', 'getMerchant']

  worldlineop.sdk.connection:
    class: 'OnlinePayments\Sdk\CommunicatorConfiguration'
    public: true
    factory: [ '@worldlineop.sdk.communicator_configuration.factory', 'getInstance' ]

  worldlineop.sdk.authenticator:
    class: 'OnlinePayments\Sdk\Authentication\V1HmacAuthenticator'
    public: true
    arguments:
      - '@worldlineop.sdk.connection'

  worldlineop.sdk.communicator_configuration.factory:
    class: 'WorldlineOP\PrestaShop\Sdk\CommunicatorConfigurationFactory'
    public: true
    arguments:
      - '@worldlineop.settings'
      - '@worldlineop.module'

  worldlineop.sdk.communicator:
    class: 'OnlinePayments\Sdk\Communicator'
    public: true
    arguments:
      - '@worldlineop.sdk.connection'
      - '@worldlineop.sdk.authenticator'
