2017 © Pedro Peláez
 

library mpay

Mobilly MPAY connection library.

image

mobilly/mpay

Mobilly MPAY connection library.

  • Wednesday, December 6, 2017
  • by saleniex
  • Repository
  • 1 Watchers
  • 0 Stars
  • 94 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 2 % Grown

The README.md

MPay

Mobilly MPay service integration library., (*1)

Download via packagist.org

$ composer require mobilly/mpay

On how to use Composer please see following link., (*2)

Usage example

namespace MpayTest;

use Mobilly\Mpay\Connector;
use Mobilly\Mpay\Request;
use Mobilly\Mpay\SecurityContext;
use Mobilly\Mpay\SuccessResponse;

require_once 'vendor/autoload.php';

$mpayUser = 'mpayuser';
$privateKey = './private.pem';
$privateKeySecret = 'SuperSecretPrivateKeySecret';
$publicKey = './mpay-public.pem';
$endpoint = 'https://mpay-test.mobilly.lv'; // In production: "https://mpay.mobilly.lv"

$context = new SecurityContext($mpayUser, $privateKey, $privateKeySecret, $publicKey);

$request = new Request($context);
$request
    ->setAmount(250)
    ->setSummary('Test transaction')
    ->setServiceId(100)
    ->setResultUrl('https://mydomain.com/result')
    ->setReturnUrl('https://mydomain.com/return')
    ->setContacts('John', 'Doe', 'john@doe.com')
    ->setLanguage('en');

$connector = new Connector($context, $endpoint . '/transaction');
$response = $connector->send($request);

if ( ! $response instanceof SuccessResponse) {
    die("Error.");
}

$transactionId = $response->getTransactionId();

header("Location: " . $endpoint . "?transid=" . $transactionId);
exit();

Private/public key creation

$ openssl genrsa -out private.pem -aes256 4096
$ openssl rsa -pubout -in private.pem -out public.pem

The Versions

06/12 2017

dev-master

9999999-dev http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires

 

05/12 2017

1.0.8

1.0.8.0 http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires

 

05/12 2017

1.0.9

1.0.9.0 http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires

 

08/11 2017

1.0.6

1.0.6.0 http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires

 

08/11 2017

1.0.7

1.0.7.0 http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires

 

13/05 2017

1.0.5

1.0.5.0 http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires

 

13/05 2017

1.0.4

1.0.4.0 http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires

 

12/05 2017

1.0.3

1.0.3.0 http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires

 

10/05 2017

1.0.2

1.0.2.0 http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires

 

10/05 2017

v1.0.1

1.0.1.0 http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires

 

02/03 2017

1.0.0

1.0.0.0 http://mobilly.lv/

Mobilly MPAY connection library.

  Sources   Download

MIT

The Requires