PHPackages                             target365/sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. target365/sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

target365/sdk
=============

Target365 SDK

v1.8.15(1y ago)3172.9k↓56.8%4[1 PRs](https://github.com/Target365/sdk-for-php/pulls)1MITPHPPHP &gt;=7.1CI failing

Since Feb 5Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/Target365/sdk-for-php)[ Packagist](https://packagist.org/packages/target365/sdk)[ RSS](/packages/target365-sdk/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (10)Versions (39)Used By (1)

[![Strex](https://github.com/Target365/sdk-for-php/raw/master/strex.png "Strex")](https://github.com/Target365/sdk-for-php/raw/master/strex.png)
------------------------------------------------------------------------------------------------------------------------------------------------

[](#)

Strex AS is a Norwegian payment and SMS gateway (Strex Connect) provider. Strex withholds an e-money license and processes more than 70 million transactions every year. Strex has more than 4.2 mill customers in Norway and are owned by the Norwegian mobile network operators (Telenor, Telia and Ice). Strex Connect is based on the Target365 marketing and communication platform.

Target365 SDK for PHP
---------------------

[](#target365-sdk-for-php)

[![License](https://camo.githubusercontent.com/4a47a8d0ccf74447370cae39573882c6142546348c99cb44392349512a5b327c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f5461726765743336352f73646b2d666f722d6e65742e7376673f7374796c653d666c6174)](https://opensource.org/licenses/MIT)

### Getting started

[](#getting-started)

To get started, please click here:  and register your organisation.

After registration you can activate the SDK by logging in to Strex Connect and create a key here:
Select "PHP" as your SDK. Copy and store the "Private key-string" safe and encrypted (we recommend EAS-encryption). We only store the public-key. Set the expiry date, and optionally add an e-mail address so we can warn you when the key is about to expire.

If you want, you can generate your own RSA public/private key-pair using openssl like this and add it to the "From OpenSSL" tab:

```
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:1024 -out private.pem

```

Use openssl to convert it to pk8 format which PHP uses.

```
openssl pkcs8 -topk8 -inform pem -in private.pem -outform pem -nocrypt -out private.key

```

The file `private.key` should look something like this:

```
-----BEGIN PRIVATE KEY-----
MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAML6duyE7hL2XPEH
qiYtyghoj6pO21zGPwSaBKTCg6i3AeJ4Ob6pCnvYQA+rRfw/+aBfT+Rv3LTSmX2i
9bAsLQB0Q3y8zku2NmqE/yoqhb9GAhL3toMasBuJ3ifvUOXTajtGEKy++YkAkRBK
7Wi/bK/IQNZd9nsOtKxz5DXNELbHAgMBAAECgYAj6k8Nsk7IX2kvXOIStkyIz/nm
vS/bHwlsp5JDZzEpWsyWEt9QJ4Mu3N6wBDSYCpDI4cWtpo1ZIZH0epgXI4wGPv2j
a6ilWZywUdhFZw1AUc3qLRoapqIPliimLhxPWmV2OfvbA4LiNvWGsF/qTaqVQ/0V
ebj+JYjJdFQcTjqlwQJBAOpKQ/EyuzDlO7YVPmw0rAfVRfVqTIvzpZ3hGThztcnQ
igI3ftbGSOPUcter3/cX5ENrIGMP6hLsWqSKWECBwK0CQQDVC6mVkrit/VXby2Zp
8epgprGhrUHojNO7ojQQN1Mupr4AHUWr2Y3xJH1uXaOjafBc6uLK7Cri3eLru+iy
Ph/DAkBLG/fgEVV1fWfBHdpfMhucf0DoRmW30CpeDNXbBS1YP6SexU/CZtrjPy55
+b3ZJy2kd2lwmJ9/5YnBiiB0vaQZAkEAuTgPcrOBjfqu94zpd/hTTT3/NtGbeGNe
/UTywJpo3iknDJBmbxaQOfMAfcA5MSw8RXwMOmGCk4RW8Z2Hm9c44wJBAJvIcnMV
6b2G6pizPPjoPhV+eNruWTyFt5ralEmxDpqV3p4TP89KVvaBlkzlT28p1P9vp5bD
J6BLhdOAUfC3CMY=
-----END PRIVATE KEY-----

```

> Please note that when using the private key in PHP you must remove all newline characters so the whole private key is in one line.

Use this openssl command to extract the public key:

```
openssl rsa -in private.key -pubout -out public.key

```

The file should look something like this:

```
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDC+nbshO4S9lzxB6omLcoIaI+q
Tttcxj8EmgSkwoOotwHieDm+qQp72EAPq0X8P/mgX0/kb9y00pl9ovWwLC0AdEN8
vM5LtjZqhP8qKoW/RgIS97aDGrAbid4n71Dl02o7RhCsvvmJAJEQSu1ov2yvyEDW
XfZ7DrSsc+Q1zRC2xwIDAQAB
-----END PUBLIC KEY-----

```

Paste the middle part in the "Public key-string" input field and select "RSA" as "Signing algorithm" in Strex Connect.

For more details on using the SDK we strongly suggest you check out our [PHP User Guide](USERGUIDE.md).

### Composer

[](#composer)

```
composer require target365/sdk

```

[![Latest Stable Version](https://camo.githubusercontent.com/534b8f06aae9956490023004535ed4dbacd393f08c4877b642af8c63949af753/68747470733a2f2f706f7365722e707567782e6f72672f7461726765743336352f73646b2f762f737461626c65)](https://packagist.org/packages/target365/sdk)

### Test Environment

[](#test-environment)

Our test-environment acts as a sandbox that simulates the real API as closely as possible. This can be used to get familiar with the service before going to production. Please be ware that the simulation isn't perfect and must not be taken to have 100% fidelity.

#### Url:

[](#url-httpstesttarget365io)

### Production Environment

[](#production-environment)

Our production environment is a mix of per-tenant isolated environments and a shared common environment. Contact  if you're interested in an isolated per-tenant environment.

#### Url:

[](#url-httpssharedtarget365io)

### Authors and maintainers

[](#authors-and-maintainers)

Target365 ()

### Issues / Bugs / Questions

[](#issues--bugs--questions)

Please feel free to raise an issue against this repository if you have any questions or problems.

### Private Key

[](#private-key)

The Target365 PHP SDK only allows RSA private keys. The private key should be passed to the `\Target365\ApiSdk\ApiClient` constructor. The key can optionally include `-----BEGIN RSA PRIVATE KEY-----`parts. You must remove all newline characters from the private key when using the PHP SDK.

### Contributing

[](#contributing)

New contributors to this project are welcome. If you are interested in contributing please send an email to .

### Automated Test

[](#automated-test)

Automated tests use PHPUnit framework. Here are some suggested steps to run automated tests.

- Clone repository.
- Change to repository directory.
- (Optional) use vagrant file as `tests/Vagrantfile`
- Run `composer install`.
    - Running composer will prompt you to enter some required details which will be stored in a file called `tests/secrets.yml`.
    - When entering `private_key` enter the key as a one line string and exclude the `-----BEGIN RSA PRIVATE KEY-----` parts.
- Run PHPUnit. `./vendor/bin/phpunit`

### License

[](#license)

This library is released under the MIT license.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance69

Regular maintenance activity

Popularity38

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 63.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~60 days

Recently: every ~79 days

Total

38

Last Release

455d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5643ce31285300d4fb20ed4453d9a63327660745b08ccc7c818f678c70094a08?d=identicon)[HansOlavS](/maintainers/HansOlavS)

---

Top Contributors

[![HansOlavS](https://avatars.githubusercontent.com/u/12972203?v=4)](https://github.com/HansOlavS "HansOlavS (100 commits)")[![bstensrud72](https://avatars.githubusercontent.com/u/41952025?v=4)](https://github.com/bstensrud72 "bstensrud72 (17 commits)")[![expertcoder](https://avatars.githubusercontent.com/u/18326086?v=4)](https://github.com/expertcoder "expertcoder (17 commits)")[![ChrisTarget365](https://avatars.githubusercontent.com/u/60473815?v=4)](https://github.com/ChrisTarget365 "ChrisTarget365 (16 commits)")[![Mats](https://avatars.githubusercontent.com/u/58366?v=4)](https://github.com/Mats "Mats (4 commits)")[![zaporylie](https://avatars.githubusercontent.com/u/1690685?v=4)](https://github.com/zaporylie "zaporylie (1 commits)")[![marcoleary](https://avatars.githubusercontent.com/u/3300320?v=4)](https://github.com/marcoleary "marcoleary (1 commits)")[![ahaaje](https://avatars.githubusercontent.com/u/7911330?v=4)](https://github.com/ahaaje "ahaaje (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/target365-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/target365-sdk/health.svg)](https://phpackages.com/packages/target365-sdk)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

744284.3k34](/packages/civicrm-civicrm-core)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[magento/community-edition

Magento 2 (Open Source)

12.1k53.0k12](/packages/magento-community-edition)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M506](/packages/shopware-core)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M11](/packages/aporat-store-receipt-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
