Skip to main content

Payline Integration

Payline is a card payment provider with the most detailed transaction logging in Logidav. Every transaction is recorded through a dedicated logging service, and command-to-transaction mappings are maintained for full audit traceability.

Components

ComponentFileRole
PaylineServicesrc/CoreBundle/Services/PaylineService.phpPayment processing and API communication
PaylineTransactionLogServicesrc/CoreBundle/Services/PaylineTransactionLogService.phpLogs every transaction for auditing
PaylineCommandsMappingEntityMaps commands to Payline transactions

Configuration

Required parameters in parameters.yml:

payline:
merchant_id: "..."
access_key: "..."
contract_number: "..."
environment: "production"

Data Flow

Transaction Logging

The PaylineTransactionLogService records every interaction with the Payline API, including:

  • Request data: amount, currency, order reference, card type
  • Response data: transaction ID, return code, status message
  • Timestamps: request sent, response received
  • Command mapping: which Logidav command triggered the transaction

The PaylineCommandsMapping entity links Logidav commands (order IDs, refund requests) to their corresponding Payline transaction IDs, enabling full traceability.

:::tip Audit trail Payline's transaction logging is the most complete among all payment integrations. Use PaylineTransactionLogService as a reference when building audit trails for other providers. :::

Payment Operations

OperationAPI CallDescription
Web paymentdoWebPaymentRedirect customer to Payline hosted page
CapturedoCaptureCapture a previously authorized payment
RefunddoRefundProcess a full or partial refund
Status checkgetWebPaymentDetailsQuery transaction status

Refund Flow

Error Handling

ScenarioBehavior
Payment declinedLogged; customer redirected to retry
Capture failureAlert raised; operator must retry manually
Refund rejectedLogged; operator notified
API timeoutLogged; retry with backoff
Duplicate transactionDetected via PaylineCommandsMapping; skipped

:::warning Duplicate prevention The PaylineCommandsMapping entity prevents duplicate charges by tracking which commands have already been processed. Always check this mapping before initiating a new transaction for the same order. :::