Esempio n. 1
0
 /**
  * @param \Generated\Shared\Transfer\PayonePaymentTransfer $paymentTransfer
  *
  * @return \Orm\Zed\Payone\Persistence\SpyPaymentPayone
  */
 protected function savePayment(PayonePaymentTransfer $paymentTransfer)
 {
     $payment = new SpyPaymentPayone();
     $payment->fromArray($paymentTransfer->toArray());
     if ($payment->getReference() === null) {
         $orderEntity = $payment->getSpySalesOrder();
         $payment->setReference($this->config->generatePayoneReference($paymentTransfer, $orderEntity));
     }
     $payment->save();
     return $payment;
 }
Esempio n. 2
0
 /**
  * @param \Orm\Zed\Payone\Persistence\SpyPaymentPayone $paymentEntity
  *
  * @return \Spryker\Zed\Payone\Business\Api\Request\Container\Authorization\PaymentMethod\EWalletContainer
  */
 protected function createPaymentMethodContainerFromPayment(SpyPaymentPayone $paymentEntity)
 {
     $paymentMethodContainer = new EWalletContainer();
     $paymentMethodContainer->setRedirect($this->createRedirectContainer($paymentEntity->getSpySalesOrder()->getOrderReference()));
     $paymentMethodContainer->setWalletType($paymentEntity->getSpyPaymentPayoneDetail()->getType());
     return $paymentMethodContainer;
 }
Esempio n. 3
0
 /**
  * @param \Orm\Zed\Payone\Persistence\SpyPaymentPayone $paymentEntity
  *
  * @return \Spryker\Zed\Payone\Business\Api\Request\Container\Authorization\PaymentMethod\OnlineBankTransferContainer
  */
 protected function createPaymentMethodContainerFromPayment(SpyPaymentPayone $paymentEntity)
 {
     $paymentDetailEntity = $paymentEntity->getSpyPaymentPayoneDetail();
     $paymentMethodContainer = new OnlineBankTransferContainer();
     $paymentMethodContainer->setRedirect($this->createRedirectContainer($paymentEntity->getSpySalesOrder()->getOrderReference()));
     $paymentMethodContainer->setBankCountry($paymentDetailEntity->getBankCountry());
     $paymentMethodContainer->setBankAccount($paymentDetailEntity->getBankAccount());
     $paymentMethodContainer->setBankCode($paymentDetailEntity->getBankCode());
     $paymentMethodContainer->setBankGroupType($paymentDetailEntity->getBankGroupType());
     $paymentMethodContainer->setIban($paymentDetailEntity->getIban());
     $paymentMethodContainer->setBic($paymentDetailEntity->getBic());
     return $paymentMethodContainer;
 }