/**
  * Réaction à la post-sale, on vérifie que le code de retour est sur 2 digits et on test le dernier pour
  * définir le message à envoyer
  *
  * @param PostSaleEvent $event the post sale Event
  * @since  2.2.0 it listen to OgoneEvents::POSTSALE instead of DonateEvents::PAYMENT_RECEIVED as it is Ogone Specific
  */
 public function onPostSale(PostSaleEvent $event)
 {
     //send email to webmaster on certain response code
     $status = $event->getResponse()->getStatus();
     if (strlen($status) == 2) {
         if (substr($status, -1) == '2') {
             $this->sendErrorMessage($event->getResponse());
         }
         if (substr($status, -1) == '3') {
             $this->sendRefusedMessage($event->getResponse());
         }
     }
     $this->logger->debug('status test called');
 }
Exemplo n.º 2
0
 public function onPostSale(PostSaleEvent $event)
 {
     $this->logger->debug('before postsale manager');
     $payment = $this->manager->handle($event->getResponse());
     $event->setPayment($payment);
 }