Example #1
0
 protected function handleInvalidPaymentStatus(Message\Response $response)
 {
     switch ($response->getPaymentStatus()) {
         case Payment::STATUS_CANCELED:
             throw PaymentCanceledException::fromResponse($response->toArray(), $response);
         case Payment::STATUS_DECLINED:
             throw PaymentDeclinedException::fromResponse($response->toArray(), $response);
     }
 }