payprocessing / multicarta-sdk
There is no license information available for the latest version (v1.0.1) of this package.
multicarta SDK
v1.0.1
2018-07-30 15:23 UTC
Requires
- php: >=5.4
- myclabs/php-enum: ^1.6
Requires (Dev)
- php: >=5.6
- phpunit/phpunit: 5.7
This package is auto-updated.
Last update: 2024-10-18 03:29:54 UTC
README
Install
composer require payprocessing/multicarta-sdk
Tests
To use unit tests
vendor/bin/phpunit tests/unit
To use integration tests copy tests/integration/ConfigSample.php and delete Sample substring. Define constants in Config class:
const URL = 'multicarta url'; const CERTIFICATE_PATH = 'absolute path to certificate'; const PRIVATE_KEY_PATH = 'absolute path to private key'; const MERCHANT = 'your merchant id'; const TDS_VENDOR_MER_ID = 'vendor merchant id'; const TDS_VENDOR_NAME = 'vendor merchant name'; const PAN = 'test card pan'; const EXP_DATE = 'test card date';
Than use
vendor/bin/phpunit tests/integration
Example
$url = ''; $certificatePath = ''; $privateKeyPath = ''; $Merchant = ''; $Amount = ''; $Description = ''; $TDSVendorMerID = ''; $TDSVendorName = ''; $builder = Platron\multicarta\mpi\CreateOrderRequestBuilder( $Merchant, $Amount, $Description, $TDSVendorMerID, $TDSVendorName ); $request = $builder->getRequest(); $client = new Platron\multicarta\mpi\Client($certificatePath, $privateKeyPath); $response = $client->sendRequest($url, $request); $parser = new Platron\multicarta\mpi\CreateOrderResponseParser($response); echo $parser->isValid(); echo $parser->isSuccess(); echo $parser->getOrderID(); echo $parser->getSessionID();