Example #1
0
 /**
  * @param \Orm\Zed\Customer\Persistence\SpyCustomer $customerEntity
  * @param \Generated\Shared\Transfer\CustomerTransfer $customerTransfer
  *
  * @return \Generated\Shared\Transfer\CustomerResponseTransfer
  */
 protected function getCustomerPasswordInvalidResponse(SpyCustomer $customerEntity, CustomerTransfer $customerTransfer)
 {
     $customerResponseTransfer = new CustomerResponseTransfer();
     $customerResponseTransfer->setIsSuccess(true);
     if (!$this->isValidPassword($customerEntity->getPassword(), $customerTransfer->getPassword())) {
         $customerErrorTransfer = new CustomerErrorTransfer();
         $customerErrorTransfer->setMessage(Messages::CUSTOMER_PASSWORD_INVALID);
         $customerResponseTransfer->setIsSuccess(false)->addError($customerErrorTransfer);
     }
     return $customerResponseTransfer;
 }