示例#1
0
 /**
  * @param \Spryker\Zed\Payone\Business\Api\Request\Container\AbstractRequestContainer $container
  *
  * @return void
  */
 protected function applyStandardParameter(AbstractRequestContainer $container)
 {
     if ($container->getPortalid() === null) {
         $container->setPortalid($this->standardParameter->getPortalId());
     }
     if ($container->getAid() === null) {
         $container->setAid($this->standardParameter->getAid());
     }
     if ($container->getMid() === null) {
         $container->setMid($this->standardParameter->getMid());
     }
     if ($container->getEncoding() === null) {
         $container->setEncoding($this->standardParameter->getEncoding());
     }
     if ($container->getMode() === null) {
         $container->setMode($this->modeDetector->getMode());
     }
     if ($container->getLanguage() === null) {
         $container->setLanguage($this->standardParameter->getLanguage());
     }
     if ($container->getApiVersion() === null) {
         $container->setApiVersion($this->standardParameter->getApiVersion());
     }
     if ($container->getResponsetype() === null) {
         $container->setResponsetype($this->standardParameter->getResponseType());
     }
 }
示例#2
0
 /**
  * @param \Orm\Zed\Payone\Persistence\SpyPaymentPayone $paymentEntity
  * @param \Spryker\Zed\Payone\Business\Api\Request\Container\AbstractRequestContainer $container
  *
  * @return \Orm\Zed\Payone\Persistence\SpyPaymentPayoneApiLog
  */
 protected function initializeApiLog(SpyPaymentPayone $paymentEntity, AbstractRequestContainer $container)
 {
     $entity = new SpyPaymentPayoneApiLog();
     $entity->setSpyPaymentPayone($paymentEntity);
     $entity->setRequest($container->getRequest());
     $entity->setMode($container->getMode());
     $entity->setMerchantId($container->getMid());
     $entity->setPortalId($container->getPortalid());
     if ($container instanceof RefundContainer || $container instanceof DebitContainer) {
         $entity->setSequenceNumber($container->getSequenceNumber());
     }
     $entity->save();
     return $entity;
 }
示例#3
0
 /**
  * @param \Spryker\Zed\Payone\Business\Api\Request\Container\AbstractRequestContainer $container
  *
  * @return void
  */
 protected function assertStandardParams(AbstractRequestContainer $container)
 {
     $this->assertEquals($this->encoding, $container->getEncoding());
     $this->assertEquals($this->mode, $container->getMode());
     $this->assertEquals($this->portalId, $container->getPortalid());
     $this->assertEquals($this->mid, $container->getMid());
     $this->assertEquals($this->key, $container->getKey());
     $this->assertEquals($this->integratorName, $container->getIntegratorName());
     $this->assertEquals($this->integratorVersion, $container->getIntegratorVersion());
     $this->assertEquals($this->solutionName, $container->getSolutionName());
     $this->assertEquals($this->solutionVersion, $container->getSolutionVersion());
 }