Skip to content
Offical mPAY24 PHP SDK
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Update because of error Nov 3, 2017
logs Implementing Request # 18 & #19 and some enhancements Jan 27, 2017
src removed mdxi validation Jan 17, 2019
tests/Responses parsing response for error responses too Jul 11, 2018
.gitignore fixed test configuration Jul 3, 2018
.travis.yml Update Oct 25, 2016 Update Nov 5, 2018
bootstrap.php Applying PSR-1 & PSR-2 and fixing Issues with inheritance in response… Feb 1, 2017
composer.json added package license information Jan 17, 2019
phpunit.xml.dist fixed test configuration Jul 3, 2018


Packagist Build Status

Offical PHP SDK for SOAP Bindings


A short demo implementation guide is available at
Documentation is available at


You can install the bindings via Composer. Run the following command:

composer require mpay24/mpay24-php

To use the bindings, use Composer's autoload:

require __DIR__ . '/vendor/autoload.php';

Manual Installation

If you do not want to use Composer, you can download the latest release. Then, to use the bindings, include the bootstrap.php file.


SDK overview


You can use the config.php file in the root directory

You also can handover the parameters while crating the Mpay24 Object

use Mpay24\Mpay24;
use Mpay24\Mpay24Order; //if you are using paymentPage

$mpay24 = new Mpay24('9****', '*********', TRUE); //Testsystem
$mpay24 = new Mpay24('7****', '*********', FALSE); //Livesystem

If you want to have a more flexible approach you can create a configuration object.

Create a token for seamless creditcard payments

$tokenizer = $mpay24->token("CC");
$tokenizerLocation = $tokenizer->getLocation();
$token = $tokenizer->getToken();

Create a payment

Creditcard payment with a token

$payment = array(
  "amount" => "100",
  "currency" => "EUR",
  "token" => $_POST['token']
$result = $mpay24->payment("TOKEN", "123 TID", $payment);

Paypal payment

$payment = array(
  "amount" => "100",
  "currency" => "EUR"
$result = $mpay24->payment("PAYPAL", "123 TID", $payment);

Create a payment page

Initialize a minimum payment page

use Mpay24\Mpay24Order;

$mdxi = new Mpay24Order();
$mdxi->Order->Tid = "123";
$mdxi->Order->Price = "1.00";
$mdxi->Order->URL->Success      = '';
$mdxi->Order->URL->Error        = '';
$mdxi->Order->URL->Confirmation = '';

$paymentPageURL = $mpay24->paymentPage($mdxi)->getLocation(); // redirect location to the payment page

header('Location: '.$paymentPageURL);

How to work with ORDER objects

Get current transaction status

Using the Pull method

With the unique mPAYTID number that we send back in the response messages


With the TID that we received by the merchant request If you don't have unique TID you will only get the last transaction with this number

$mpay24->paymentStatusByTID("123 TID");


In order for the Mpay24 PHP SDK to work, your installation will have to meet the following prerequisites:

Please refer to or consult your systems administrator in order to find out if your system fulfills the prerequisites.

You can’t perform that action at this time.