dev-master
9999999-dev https://github.com/PandaHugMonster/mpay24mPAY24 PHP API
LICENSE.md
The Requires
- php >=5.4.0
- ext-curl *
- ext-dom *
- ext-mcrypt *
by Anna Sadriu
by Tobias Lins
by Ivan Ponomarev
api library mpay24
Wallogit.com
2017 © Pedro Peláez
This version is a fork of an original repository. Added and Modified: * Merged last modifications from the main repository (Be careful structure has been changed a lot), (*1)
Offical PHP SDK for SOAP Bindings, (*3)
A short demo implementation guide is available at https://docs.mpay24.com/docs/get-started Documentation is available at https://docs.mpay24.com/docs., (*4)
You can install the bindings via Composer. Run the following command:, (*5)
composer require mpay24/mpay24-php
To use the bindings, use Composer's autoload:, (*6)
require __DIR__ . '/vendor/autoload.php';
If you do not want to use Composer, you can download the latest release. Then, to use the bindings, include the bootstrap.php file., (*7)
require_once('bootstrap.php');
You can use the config.php file in the root directory, (*8)
You also can handover the parameters while crating the Mpay24 Object, (*9)
require_once("../bootstrap.php");
use Mpay24\Mpay24;
use Mpay24\Mpay24Order; //if you are using paymentPage
$mpay24 = new Mpay24('9****', '*********');
If you want to have a more flexible approach you can create a configuration object., (*10)
$tokenizer = $mpay24->token("CC")->getPaymentResponse();
Creditcard payment with a token, (*11)
$payment = array(
"amount" => "100",
"currency" => "EUR",
"token" => $_POST['token']
);
$result = $mpay24->payment("TOKEN", "123 TID", $payment);
Paypal payment, (*12)
$payment = array(
"amount" => "100",
"currency" => "EUR"
);
$result = $mpay24->payment("PAYPAL", "123 TID", $payment);
Initialize a minimum payment page, (*13)
use Mpay24\Mpay24Order;
$mdxi = new Mpay24Order();
$mdxi->Order->Tid = "123";
$mdxi->Order->Price = "1.00";
$mdxi->Order->URL->Success = 'http://yourpage.com/success';
$mdxi->Order->URL->Error = 'http://yourpage.com/error';
$mdxi->Order->URL->Confirmation = 'http://yourpage.com/confirmation';
$paymentPageURL = $mpay24->paymentPage($mdxi)->getLocation(); // redirect location to the payment page
header('Location: '.$paymentPageURL);
How to work with ORDER objects, (*14)
With the unique mPAYTID number that we send back in the response messages, (*15)
$mpay24->paymentStatus("12345");
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, (*16)
$mpay24->paymentStatusByTID("123 TID");
In order for the Mpay24 PHP SDK to work, your installation will have to meet the following prerequisites:, (*17)
Please refer to http://www.php.net/phpinfo or consult your systems administrator in order to find out if your system fulfills the prerequisites., (*18)
mPAY24 PHP API
LICENSE.md
api library mpay24