/**
  * Normalizes gateway $name.
  *
  * @param $name
  * @return string
  */
 public function normalizeGateway($name)
 {
     foreach (static::$_gateways as $gateway) {
         if (Helper::simplify($gateway) === Helper::simplify($name)) {
             return $gateway;
         }
     }
     return $name;
 }
 /**
  * Get payment time.
  * @return string
  */
 public function getTime()
 {
     return Helper::isotime($this->getVar('LMI_SYS_TRANS_DATE') . ' Europe/Moscow');
 }
 protected function setUp()
 {
     $this->object = Helper::create(['gateway' => $this->gateway]);
 }
Exemple #4
0
 /**
  * Creates merchant instance from its array configuration.
  *
  * @param string $id     ID
  * @param array  $config merchant instance configuration.
  * @return AbstractMerchant merchant instance.
  */
 public function createMerchant($id, array $config)
 {
     return Helper::create(array_merge(['library' => $this->merchantLibrary, 'gateway' => $id, 'id' => $id], $config));
 }
Exemple #5
0
 public function testSimplify()
 {
     $this->assertSame('simpler', Helper::simplify('SimplEr'));
     $this->assertSame('simpler', Helper::simplify('S im-plEr'));
 }