/**
  * TransactionException constructor.
  *
  * @param VendorInterface $vendor
  * @param string          $message
  * @param int             $code
  * @param $previousException
  */
 public function __construct($vendor, $message = '', $code = 0, $previousException = null)
 {
     $this->vendor = $vendor;
     parent::__construct($message ?: "The HiPay Wallet account {$vendor->getHiPayId()} is unidentified. Please upload identification documents for Mirakl shop " . $vendor->getMiraklId() . " if you didn't already do so.", $code, $previousException);
 }
 /**
  * Return the values who should't
  * change after the registration of the hipay wallet.
  *
  * @param VendorInterface $vendor
  */
 protected function getImmutableValues(VendorInterface $vendor)
 {
     $previousValues['email'] = $vendor->getEmail();
     $previousValues['hipayId'] = $vendor->getHiPayId();
     $previousValues['miraklId'] = $vendor->getMiraklId();
     return $previousValues;
 }
 /**
  * NoWalletFoundException constructor.
  *
  * @param VendorInterface $vendor
  * @param string          $message
  * @param int             $code
  * @param Exception       $previous
  */
 public function __construct(VendorInterface $vendor, $message = '', $code = 0, Exception $previous = null)
 {
     $this->vendor = $vendor;
     parent::__construct($message ?: "The vendor {$vendor->getMiraklId()} can't be saved", $code, $previous);
 }
 /**
  * InvalidBankInfoException constructor.
  *
  * @param VendorInterface $vendor
  * @param BankInfo        $bankInfo
  * @param string          $message
  * @param int             $code
  * @param Exception       $previous
  */
 public function __construct(VendorInterface $vendor, BankInfo $bankInfo, $message = '', $code = 0, Exception $previous = null)
 {
     $this->vendor = $vendor;
     $this->bankInfo = $bankInfo;
     parent::__construct($message ?: "The Bank info for shop {$vendor->getMiraklId()} are not synchronized with HiPay Wallet (which means that bank info have been updated in Mirakl though they were already registered into HiPay Wallet). Please contact HiPay in order to update the bank info for this shop.", $code, $previous);
 }