PHP code example of hoya / masterpass-bundle

1. Go to this page and download the library: Download hoya/masterpass-bundle 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/ */

    

hoya / masterpass-bundle example snippets

js
return array(
   // ...
   new Hoya\MasterpassBundle\HoyaMasterpassBundle(),
   // ...
);
js
try {
                
    $payment = $this->get('hoya_masterpass_service')->getPaymentData($callback, '1234');

} catch (\Exception $e) {
    $this->get('session')->getFlashBag()->add('error', $e->getMessage());
}