コード例 #1
0
ファイル: SaverTest.php プロジェクト: spryker/Payolution
 /**
  * @return void
  */
 public function testSaveOrderPaymentHasAddressData()
 {
     $checkoutResponseTransfer = $this->createCheckoutResponse();
     $quoteTransfer = $this->getQuoteTransfer($checkoutResponseTransfer);
     $orderManager = new Saver($this->getPayolutionBusinessBusinessFactory());
     $orderManager->saveOrderPayment($quoteTransfer, $checkoutResponseTransfer);
     $paymentTransfer = $quoteTransfer->getPayment()->getPayolution();
     $addressTransfer = $paymentTransfer->getAddress();
     /** @var \Orm\Zed\Payolution\Persistence\SpyPaymentPayolution $paymentEntity */
     $paymentEntity = SpyPaymentPayolutionQuery::create()->findOneByFkSalesOrder($checkoutResponseTransfer->getSaveOrder()->getIdSalesOrder());
     $this->assertEquals($addressTransfer->getCity(), $paymentEntity->getCity());
     $this->assertEquals($addressTransfer->getIso2Code(), $paymentEntity->getCountryIso2Code());
     $this->assertEquals($addressTransfer->getZipCode(), $paymentEntity->getZipCode());
     $this->assertEquals($addressTransfer->getEmail(), $paymentEntity->getEmail());
     $this->assertEquals($addressTransfer->getFirstName(), $paymentEntity->getFirstName());
     $this->assertEquals($addressTransfer->getLastName(), $paymentEntity->getLastName());
     $this->assertEquals($addressTransfer->getSalutation(), $paymentEntity->getSalutation());
     $this->assertEquals($addressTransfer->getPhone(), $paymentEntity->getPhone());
     $this->assertEquals($addressTransfer->getCellPhone(), $paymentEntity->getCellPhone());
     $this->assertEquals(trim(sprintf('%s %s %s', $addressTransfer->getAddress1(), $addressTransfer->getAddress2(), $addressTransfer->getAddress3())), $paymentEntity->getStreet());
 }
コード例 #2
0
 /**
  * @return \Orm\Zed\Payolution\Persistence\SpyPaymentPayolutionQuery
  */
 public function createPaymentPayolutionQuery()
 {
     return SpyPaymentPayolutionQuery::create();
 }