PHP code example of asciisd / mastercard-php

1. Go to this page and download the library: Download asciisd/mastercard-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

asciisd / mastercard-php example snippets



bash
composer 
 php
 Mastercard::setMerchantId('your_merchant_id');
 Mastercard::setApiKey("your_merchant_password");
 Mastercard::setApiVersion(53);

$result = \Mastercard\Session::create();
$session_id = $result->session->id;