/** * Generate vault payment public hash * * @param PaymentTokenInterface $paymentToken * @return string */ protected function generatePublicHash(PaymentTokenInterface $paymentToken) { $hashKey = $paymentToken->getGatewayToken(); if ($paymentToken->getCustomerId()) { $hashKey = $paymentToken->getCustomerId(); } $hashKey .= $paymentToken->getPaymentMethodCode() . $paymentToken->getType() . $paymentToken->getTokenDetails(); return $this->encryptor->getHash($hashKey); }
/** * Can render specified token * * @param PaymentTokenInterface $token * @return boolean */ public function canRender(PaymentTokenInterface $token) { return $token->getPaymentMethodCode() === Config::METHOD_PAYFLOWPRO; }
/** * Can render specified token * * @param PaymentTokenInterface $token * @return boolean */ public function canRender(PaymentTokenInterface $token) { return $token->getPaymentMethodCode() === ConfigProvider::CODE; }