Package org.jayasoft.woj.portal.business.services

Examples of org.jayasoft.woj.portal.business.services.PaymentRefusedException


                        // TODO g�rer annulation ou refus de paiement
                        pendingOrder.setStatus(Order.ORDER_PAYMENT_REFUSED);
                        LOGGER.info("order " + pendingOrder.getId() + " payment refused, code : " + bankResponseCode);
                        DaoFactory.getOrderDao().save(pendingOrder);
            LOGGER.warn("Payment refused by bank return code:"+bankResponseCode);
                        PaymentRefusedException e = new PaymentRefusedException(bankResponseCode);
                        e.appendError(RessourceBundleApplicationMessage.error("registration.payment-form.error." + bankResponseCode, null));
            throw e;
          }
        } else {
            LOGGER.info("payment already done for order " + pendingOrder.getId());
                }
        return paymentInfo;
      } else  {
        throw ServiceException.create("Internal error", "No order found withid="+orderId+" defined in transaction id="+transactionId, null);
      }
    } catch (FileNotFoundException e) {
      throw ServiceException.create("Internal error", "Configuration file not found", e);
    } catch (RegistrationException e) {
      throw ServiceException.create("Internal error", "Unable to add user", e);
    } catch (SIPSException e) {
      throw ServiceException.create("Internal error", "Payment api throw an error", e);
    } catch (ServiceException se) {
            throw se;
        } catch (Exception e) {
      throw ServiceException.create("Internal error", "Unable to process payment :"+e.getMessage(), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.portal.business.services.PaymentRefusedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.