for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PayumTW\Ecpay;
use Exception;
use Detection\MobileDetect;
abstract class Api
{
/**
* $sdk.
*
* @var mixed
*/
protected $sdk;
* Verify if the hash of the given parameter is correct.
* @param array $params
* @return bool
public function verifyHash(array $params)
$result = false;
try {
$this->sdk->CheckOutFeedback($params);
$result = true;
} catch (Exception $e) {
}
return $result;
* isMobile.
protected function isMobile()
$detect = new MobileDetect();
return ($detect->isMobile() === false && $detect->isTablet() === false) ? false : true;