"Request does not match any route."
appears because of incorrect path of webapi.xml.
You must move it to etc/webapi.xml
.
Also your file Model/ShetabService.php
contains errors.:
class ShetabService
, notinterface
- typo in
__construct
function name(lastt
missed)
Here is fixed one:
namespace Amaj\ShetabPayment\Model;
class ShetabService implements \Amaj\ShetabPayment\Api\ShetabServiceInterface
{
private $_logger;
public function __construct(\Psr\Log\LoggerInterface $logger) {
$this->_logger = $logger;
}
/** Returns Transaction Reference ID
*
* @param int $quoteId
* @return string|null
*/
public function getTransRefId($quoteId)
{
$this->_logger->info('getTransRefId is called: ' . $quoteId);
$result = array(
'transRefId' => 50
);
return json_encode($result);
}
}