• Namespace
  • Class

Namespaces

  • Klarna
    • Exceptions
    • Rest
      • Checkout
      • CustomerToken
      • HostedPaymentPage
      • InstantShopping
      • MerchantCardService
      • OrderManagement
      • Payments
      • Settlements
      • Transport
        • Exception

Classes

  • ApiResponse
  • Connector
  • CURLConnector
  • GuzzleConnector
  • Method
  • ResponseValidator
  • UserAgent

Interfaces

  • ConnectorInterface
  • UserAgentInterface

Interface UserAgentInterface

The user agent is used to help identify the client and provide additional information when assistance is needed with troubleshooting.

In addition to following the User Agent as specified by RFC 2616, section 14.43, there are a number of predefined fields which should be used when applicable:

Library: Information about the SDK and version being used.

Library/[Library name]_[version]

Examples: Library/Klarna.SDK_1.0.0

Language: This is used to indicate which programming language and version is being used.

Language/[Language]_[version]

Example: Language/PHP_5.5.9-1ubuntu4.4

OS: Information on what operating system the merchant is using for their web server.

OS/[Operating system]_[version and architecture]

Examples: OS/Linux_3.13.5-101.fc19.x86_64

Partner: This is used to indicate if the integration is done using a partner.

Partner/[Partner name]

Examples: Partner/ShopPartnerName

Platform: Information about which e-commerce platform is used to integrate.

Platform/[Platform name]_[version]

Examples: Platform/Magento_1.2.3 Platform/Opencart_1.5.6.4

Module: Used in conjunction with platform to provide information about the platform plugin.

Module/[Module name]_[version]

Examples: Module/Klarna.Module_1.0.0

Webserver: Information about the web server being used.

Webserver/[Webserver name]_[version]

Examples: Webserver/Apache_2.4.1 Webserver/Nginx_1.7.6 Webserver/IIS_7.5

Each component is written as key and name separated by slash, optionally followed by an underscore and the version. After which, separated by space, additional information can be added using parenthesis where individual elements inside are separated by semi-colon.

All of the component strings are then combined using space as the delimiter.

Specifying SDK dependencies for the Library field could be achieved as follows: Library/Klarna.SDK_1.0.0 (Guzzle/4.2.2 ; curl/7.35.0)

Full user agent example: Library/Klarna.SDK_1.0.0 Language/PHP_5.5.9 OS/Linux_3.13.5-101.fc19.x86_64

Direct known implementers

Klarna\Rest\Transport\UserAgent

Namespace: Klarna\Rest\Transport
Located at Klarna/Rest/Transport/UserAgentInterface.php

Methods summary

public string
# __toString( )

Serialises the user agent.

Serialises the user agent.

Returns

string

Magic methods summary

API documentation generated by ApiGen