/** * @param \Orm\Zed\Payone\Persistence\SpyPaymentPayone $paymentEntity * * @return \Spryker\Zed\Payone\Business\Api\Request\Container\RefundContainer */ public function mapPaymentToRefund(SpyPaymentPayone $paymentEntity) { $refundContainer = new RefundContainer(); $refundContainer->setTxid($paymentEntity->getTransactionId()); $refundContainer->setSequenceNumber($this->getNextSequenceNumber($paymentEntity->getTransactionId())); $refundContainer->setCurrency($this->getStandardParameter()->getCurrency()); $refundContainer->setBankcountry($paymentEntity->getSpyPaymentPayoneDetail()->getBankCountry()); $refundContainer->setBankaccount($paymentEntity->getSpyPaymentPayoneDetail()->getBankAccount()); $refundContainer->setBankcode($paymentEntity->getSpyPaymentPayoneDetail()->getBankCode()); $refundContainer->setBankbranchcode($paymentEntity->getSpyPaymentPayoneDetail()->getBankBranchCode()); $refundContainer->setBankcheckdigit($paymentEntity->getSpyPaymentPayoneDetail()->getBankCheckDigit()); $refundContainer->setIban($paymentEntity->getSpyPaymentPayoneDetail()->getIban()); $refundContainer->setBic($paymentEntity->getSpyPaymentPayoneDetail()->getBic()); return $refundContainer; }
/** * @return void */ public function testEmptyRefundContainer() { $container = new RefundContainer(); $this->assertCount(1, $container->toArray()); // request set in container }
/** * @param \Orm\Zed\Payone\Persistence\SpyPaymentPayone $paymentEntity * * @return \Spryker\Zed\Payone\Business\Api\Request\Container\RefundContainer */ public function mapPaymentToRefund(SpyPaymentPayone $paymentEntity) { $refundContainer = new RefundContainer(); $refundContainer->setTxid($paymentEntity->getTransactionId()); $refundContainer->setSequenceNumber($this->getNextSequenceNumber($paymentEntity->getTransactionId())); $refundContainer->setCurrency($this->getStandardParameter()->getCurrency()); return $refundContainer; }