PHP code example of hotel-quickly / molpay-api

1. Go to this page and download the library: Download hotel-quickly/molpay-api 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/ */

    

hotel-quickly / molpay-api example snippets


$configurator->onCompile[] = function ($configurator, $compiler) {
    $compiler->addExtension('molpayApi', new \HQ\MolpayApi\MolpayApiExtension());
};

/** @var \HQ\MolpayApi\Manager @autowire */
private $molpayManager;

$response = $this->molpayManager->send(RequestFactory::REVERSAL, function(Reversal $request) {
	$request->setParam('txnID', '1234567890')
		->setParam('domain', $request->getDomain())
		->setParam('skey', $request->getSKey());
});